@@ -17,8 +17,9 @@ concurrency:
1717
1818jobs :
1919 unit-tests :
20- name : Catalyst Core Tests and Code Coverage
20+ name : Unit Tests
2121 runs-on : ubuntu-latest
22+ needs : [integration-tests]
2223 env :
2324 CARGO_FLAGS : --verbose --locked
2425 steps :
4849 run :
4950 sudo apt install -y protobuf-compiler libssl-dev libpq-dev libsqlite3-dev pkg-config
5051
51- - run : |
52+ - name : Run unit tests
53+ run : |
5254 cargo llvm-cov nextest --no-report --manifest-path ./src/catalyst-toolbox/catalyst-toolbox/Cargo.toml --profile ci
5355 cargo llvm-cov nextest --no-report --manifest-path ./src/catalyst-toolbox/snapshot-lib/Cargo.toml --profile ci
5456
@@ -89,15 +91,40 @@ jobs:
8991 path-to-lcov : " ./lcov.info"
9092
9193 integration-tests :
92- name : Catalyst Core Tests and Code Coverage
94+ name : Integration Tests
9395 runs-on : ubuntu-latest
9496 env :
9597 CARGO_FLAGS : --verbose --locked
9698 steps :
97- - name : Integration tests
99+ - name : Checkout code
100+ uses : actions/checkout@v3
101+ with :
102+ ref : ${{ github.event.pull_request.head.sha }}
103+
104+ - uses : Swatinem/rust-cache@v2
105+ with :
106+ shared-key : " cov"
107+ save-if : " true"
108+
109+ - name : Install Rust toolchain
110+ uses : actions-rs/toolchain@v1
111+ with :
112+ toolchain : " 1.65" # it says it can read the rust-toolchain file, but it fails if we omit this
113+ components : llvm-tools-preview
114+
115+ - name : Install cargo-nextest
116+ run : curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
117+
118+ - name : Install cargo-llvm-cov
119+ uses : taiki-e/install-action@cargo-llvm-cov
120+
121+ - name : Install system deps
122+ run :
123+ sudo apt install -y protobuf-compiler libssl-dev libpq-dev libsqlite3-dev pkg-config
124+
125+ - name : Run integration tests
98126 run : |
99- echo "Integration test coverage is temporarily disabled."
100- # source <(cargo llvm-cov show-env --export-prefix)
101- # cargo build -p jcli -p jormungandr -p explorer -p vit-servicing-station-cli -p vit-servicing-station-server
102- # cargo llvm-cov nextest --no-report --manifest-path ./src/vit-servicing-station/vit-servicing-station-tests/Cargo.toml --profile ci
103- # cargo llvm-cov nextest --no-report --manifest-path ./src/jormungandr/testing/jormungandr-integration-tests/Cargo.toml --profile ci
127+ source <(cargo llvm-cov show-env --export-prefix)
128+ cargo build -p jcli -p jormungandr -p explorer -p vit-servicing-station-cli -p vit-servicing-station-server
129+ cargo llvm-cov nextest --no-report --manifest-path ./src/vit-servicing-station/vit-servicing-station-tests/Cargo.toml --profile ci
130+ cargo llvm-cov nextest --no-report --manifest-path ./src/jormungandr/testing/jormungandr-integration-tests/Cargo.toml --profile ci
0 commit comments