Merge pull request #2 from janbridley/animation-logo #10
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 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
env: | |
CARGO_TERM_COLOR: always | |
CLICOLOR: 1 | |
jobs: | |
unit_test: | |
name: Unit test [${{ matrix.mode }}-rust-${{ matrix.rust }}-${{ matrix.os }}] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-24.04 | |
- macos-14 | |
rust: | |
- 1.81.0 | |
mode: | |
- debug | |
include: | |
- os: ubuntu-24.04 | |
rust: 1.81.0 | |
mode: release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Update rust | |
run: rustup install ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} | |
- name: Check rust installation | |
run: rustc -vV | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: | | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-rust-${{ matrix.rust }}-cargo-unit-test-${{ matrix.mode }}-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build | |
run: cargo build ${{ matrix.mode == 'release' && '--release' || '' }} --verbose | |
- name: Run tests | |
run: cargo test ${{ matrix.mode == 'release' && '--release' || '' }} --verbose | |
- name: Build API documentation | |
run: cargo doc --no-deps | |
tests_complete: | |
name: All tests | |
if: always() | |
# needs: [unit_test, execute_tutorials, build_documentation] | |
needs: [unit_test] | |
runs-on: ubuntu-latest | |
steps: | |
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}' | |
- name: Done | |
run: exit 0 |