nix-weather/.github/workflows/unit-tests.yml
Christina Sørensen 2256d38a68
Some checks are pending
Security audit / security_audit (push) Waiting to run
Conventional Commits / Conventional Commits (push) Waiting to run
/ Flake Checker (push) Waiting to run
/ Check Nix Flake (push) Waiting to run
/ Build Nix package (push) Waiting to run
Unit tests (BSD) / unit-tests-freebsd (push) Waiting to run
Unit tests (BSD) / unit-tests-netbsd (push) Waiting to run
Unit tests / unit-tests (macos-latest, 1.70.0) (push) Waiting to run
Unit tests / unit-tests (macos-latest, beta) (push) Waiting to run
Unit tests / unit-tests (macos-latest, nightly) (push) Waiting to run
Unit tests / unit-tests (macos-latest, stable) (push) Waiting to run
Unit tests / unit-tests (ubuntu-latest, 1.70.0) (push) Waiting to run
Unit tests / unit-tests (ubuntu-latest, beta) (push) Waiting to run
Unit tests / unit-tests (ubuntu-latest, nightly) (push) Waiting to run
Unit tests / unit-tests (ubuntu-latest, stable) (push) Waiting to run
Unit tests / unit-tests (windows-latest, 1.70.0) (push) Waiting to run
Unit tests / unit-tests (windows-latest, beta) (push) Waiting to run
Unit tests / unit-tests (windows-latest, nightly) (push) Waiting to run
Unit tests / unit-tests (windows-latest, stable) (push) Waiting to run
Unit tests (BSD) / unit-tests-openbsd (push) Waiting to run
feat: flake + lix
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2024-09-05 07:32:31 +02:00

51 lines
1.4 KiB
YAML

# SPDX-FileCopyrightText: 2024 Christina Sørensen
#
# SPDX-License-Identifier: EUPL-1.2
name: Unit tests
on:
push:
branches: [main]
paths:
- '.github/workflows/unit-tests.yml'
- 'src/**'
- 'Cargo.*'
- build.rs
pull_request:
branches: [main]
paths:
- '.github/workflows/unit-tests.yml'
- 'src/**'
- 'Cargo.*'
- build.rs
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: --deny warnings
jobs:
unit-tests:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.rust == 'nightly' }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [1.70.0, stable, beta, nightly]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: rustup toolchain install ${{ matrix.rust }} --profile minimal
- uses: Swatinem/rust-cache@v2
- name: Install cargo-hack
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
command: cargo install cargo-hack
- name: Run rustfmt checks
run: cargo fmt --check
- name: Run clippy lints
run: cargo clippy -- -D warnings
- name: Run unit tests
run: cargo hack test