Skip to content

feat: Round ingress_expiry to the minute (#481) #1898

feat: Round ingress_expiry to the minute (#481)

feat: Round ingress_expiry to the minute (#481) #1898

Workflow file for this run

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@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1
- name: Install wasm-pack
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | 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-targets --all-features
cargo test --all-targets --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: Purge for OSX
if: matrix.os == 'macos-latest'
run: |
# There is a bug with BSD tar on macOS where the first 8MB of the file are
# sometimes all NUL bytes. See https://github.com/actions/cache/issues/403
# and https://github.com/rust-lang/cargo/issues/8603 for some more
# information. An alternative solution here is to install GNU tar, but
# flushing the disk cache seems to work, too.
sudo /usr/sbin/purge
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