set nextest install action to v2 #1
Workflow file for this run
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: | |
workflow_call: | |
inputs: | |
nextest-flags: | |
required: false | |
type: string | |
env: | |
NEXTEST-FLAGS: ${{ inputs.nextest-flags }} | |
jobs: | |
build-test-artifacts: | |
name: Build test artifacts | |
runs-on: ubuntu-22.04 | |
if: github.event.pull_request.draft == false | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest@v2 | |
- name: Install protoc | |
run: sudo apt-get install protobuf-compiler | |
- name: Cargo cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Build and archive tests | |
run: cargo nextest archive --verbose --workspace --all-features --archive-file nextest-archive.tar.zst | |
- name: Upload archive | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nextest-archive | |
path: nextest-archive.tar.zst | |
run-tests: | |
name: Run tests | |
runs-on: ubuntu-22.04 | |
if: github.event.pull_request.draft == false | |
needs: build-test-artifacts | |
env: | |
RUSTFLAGS: -D warnings | |
container: | |
image: zingodevops/ci-build:002 | |
options: --security-opt seccomp=unconfined | |
strategy: | |
matrix: | |
partition: [1, 2, 3, 4, 5, 6, 7, 8] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: create binaries dir | |
run: mkdir -p ./test_binaries/bins | |
- name: Symlink lightwalletd and zcash binaries | |
run: ln -s /usr/bin/lightwalletd /usr/bin/zcashd /usr/bin/zcash-cli ./test_binaries/bins/ | |
- name: Symlink zcash parameters | |
run: ln -s /root/.zcash-params /github/home | |
- name: Download archive | |
uses: actions/download-artifact@v3 | |
with: | |
name: nextest-archive | |
- name: Run tests | |
run: | | |
cargo nextest run --verbose --profile ci --archive-file nextest-archive.tar.zst \ | |
--workspace-remap ./ --partition count:${{ matrix.partition }}/8 ${{ env.NEXTEST-FLAGS }} | |