Refinement and test zap #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- main | |
- dev | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
db: | |
- memory | |
- sqlite | |
- postgres | |
- mariadb | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Install dependences | |
run: sh ./contrib/ubuntu.sh | |
- name: Start dependences | |
run: | | |
cd ./contrib | |
docker-compose -f docker-compose.test.yml up -d | |
sleep 3 | |
sh dev.sh test -v | |
sh dev.sh copy_cert -v | |
- name: Test with db ${{ matrix.db }} | |
run: | | |
source contrib/env.sh ${{ matrix.db }} | |
cargo test -p lightning-client | |
cargo test |