test: remove flaky basic_expiry integration test #2777
Workflow file for this run
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
| - name: Install wasm-pack and chromedriver for WASM tests | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: | | |
| curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| sudo apt-get install -y chromium-chromedriver | |
| - name: Install node for SoftHSM tests | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install and Configure SoftHSM | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: | | |
| set -ex | |
| sudo apt-get install -f libsofthsm2 opensc-pkcs11 opensc | |
| sudo usermod -a -G softhsm $USER | |
| echo "SOFTHSM2_CONF=$HOME/softhsm.conf" >>$GITHUB_ENV | |
| echo "directories.tokendir = $HOME/softhsm/tokens/" >$HOME/softhsm.conf | |
| mkdir -p $HOME/softhsm/tokens | |
| - name: Download test assets | |
| if: ${{ !contains(matrix.os, 'windows') }} | |
| run: | | |
| ./scripts/download_reftest_assets.sh | |
| - name: Run Tests | |
| shell: bash | |
| run: | | |
| # Test all features and no features for each package. | |
| for p in $(cargo metadata --no-deps --format-version 1 | jq -r .packages[].manifest_path); do | |
| pushd $(dirname $p) | |
| cargo test --all-features | |
| cargo test --no-default-features | |
| popd | |
| done | |
| env: | |
| RUST_BACKTRACE: 1 | |
| - name: Run Tests (WASM) | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: | | |
| CARGO_TARGET_DIR=target/wasm wasm-pack test --chrome --headless ic-agent --features wasm-bindgen | |
| - name: Run Tests (SoftHSM) | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: | | |
| set -ex | |
| softhsm2-util --init-token --slot $HSM_SLOT_INDEX --label "agent-rs-token" --so-pin $HSM_SO_PIN --pin $HSM_PIN | |
| # create key: | |
| pkcs11-tool -k --module $HSM_PKCS11_LIBRARY_PATH --login --slot-index $HSM_SLOT_INDEX -d $HSM_KEY_ID --key-type EC:prime256v1 --pin $HSM_PIN | |
| cd ref-tests | |
| cargo test --all-features -- --nocapture --test-threads=1 | |
| env: | |
| RUST_BACKTRACE: 1 | |
| HSM_PKCS11_LIBRARY_PATH: /usr/lib/softhsm/libsofthsm2.so | |
| HSM_SO_PIN: 123456 | |
| HSM_PIN: 1234 | |
| HSM_SLOT_INDEX: 0 | |
| HSM_KEY_ID: abcdef | |
| aggregate: | |
| name: test:required | |
| runs-on: ubuntu-latest | |
| if: ${{ always() }} | |
| needs: test | |
| steps: | |
| - name: Check test result | |
| if: ${{ needs.test.result != 'success' }} | |
| run: exit 1 |