refactor: cleanup code #103
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 | |
env: | |
PROJECT_NAME: swiss-qr-bill-decoder | |
CARGO_TERM_COLOR: always | |
on: | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
test: | |
runs-on: ${{ matrix.platform.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- target: aarch64-apple-darwin | |
runner: macos-latest | |
cross: false | |
- target: aarch64-unknown-linux-gnu | |
runner: ubuntu-latest | |
cross: true | |
- target: aarch64-unknown-linux-musl | |
runner: ubuntu-latest | |
cross: true | |
- target: i686-unknown-linux-gnu | |
runner: ubuntu-latest | |
cross: true | |
- target: i686-unknown-linux-musl | |
runner: ubuntu-latest | |
cross: true | |
- target: x86_64-apple-darwin | |
runner: macos-latest | |
cross: false | |
- target: x86_64-unknown-linux-gnu | |
runner: ubuntu-latest | |
cross: false | |
- target: x86_64-unknown-linux-musl | |
runner: ubuntu-latest | |
cross: false | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: "${{ matrix.platform.target }}" | |
- name: Install cross | |
uses: taiki-e/install-action@v2 | |
if: matrix.platform.cross | |
with: | |
tool: cross | |
- name: Rust (Cargo) Caching | |
uses: Swatinem/rust-cache@v2 | |
- name: Build | |
env: | |
CARGO: ${{ matrix.platform.cross && 'cross' || 'cargo' }} | |
run: | | |
$CARGO test \ | |
--target ${{ matrix.platform.target }} \ | |
--no-run \ | |
--locked | |
- name: Run tests | |
env: | |
CARGO: ${{ matrix.platform.cross && 'cross' || 'cargo' }} | |
run: | | |
$CARGO test \ | |
--target ${{ matrix.platform.target }} \ | |
--locked |