fix: readme typo #93
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
- release/* | |
- feature/* | |
- bugfix/* | |
- hotfix/* | |
pull_request: | |
branches: | |
- develop | |
types: | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
- ready_for_review | |
env: | |
CARGO_TERM_COLOR: always | |
CLICOLOR_FORCE: 1 | |
IS_PULL_REQUEST: ${{ github.event_name == 'pull_request' }} | |
jobs: | |
commits: | |
name: Conventional Commits | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Setup the Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Setup the environment | |
run: nix build -L --no-link .#devShells.x86_64-linux.ci | |
- name: Run the commit linter | |
run: nix develop .#ci -c cargo xtask check commits | |
format: | |
name: Code formatting and typos | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone the repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Setup the Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Setup the environment | |
run: nix build -L --no-link .#devShells.x86_64-linux.ci | |
- name: Check the code is formatted and free of typos | |
run: nix develop .#ci -c cargo xtask check format | |
unused-deps: | |
name: Unused dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone the repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Setup the Nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Setup the environment | |
run: nix build -L --no-link .#devShells.x86_64-linux.udeps | |
- name: Look for unused dependencies | |
run: nix develop .#udeps -c cargo xtask check unused-deps | |
build: | |
name: Compilation and static analysis | |
runs-on: ${{ matrix.systems.runner }} | |
strategy: | |
matrix: | |
systems: | |
- system: x86_64-linux | |
runner: ubuntu-latest | |
- system: aarch64-darwin | |
runner: macos-latest | |
- system: x86_64-windows | |
runner: windows-latest | |
steps: | |
- name: Configure Git | |
run: git config --global core.autocrlf false | |
- name: Clone the repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
if: matrix.systems.system != 'x86_64-windows' | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Setup the Nix cache | |
if: matrix.systems.system != 'x86_64-windows' | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Setup the environment (with Nix) | |
if: matrix.systems.system != 'x86_64-windows' | |
run: | | |
nix build -L --no-link .#devShells.${{ matrix.systems.system }}.ci | |
- name: Setup the environment (without Nix) | |
if: matrix.systems.system == 'x86_64-windows' | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-hack | |
- name: Compile and run static analysis (with Nix) | |
if: matrix.systems.system != 'x86_64-windows' | |
run: nix develop .#ci -c cargo xtask check build | |
- name: Compile and run static analysis (without Nix) | |
if: matrix.systems.system == 'x86_64-windows' | |
run: cargo xtask check build | |
test: | |
name: Tests | |
runs-on: ${{ matrix.systems.runner }} | |
strategy: | |
matrix: | |
systems: | |
- system: x86_64-linux | |
runner: ubuntu-latest | |
- system: aarch64-darwin | |
runner: macos-latest | |
- system: x86_64-windows | |
runner: windows-latest | |
steps: | |
- name: Configure Git | |
run: git config --global core.autocrlf false | |
- name: Clone the repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
if: matrix.systems.system != 'x86_64-windows' | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Setup the Nix cache | |
if: matrix.systems.system != 'x86_64-windows' | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Setup the environment (with Nix) | |
if: matrix.systems.system != 'x86_64-windows' | |
run: | | |
nix build -L --no-link .#devShells.${{ matrix.systems.system }}.ci | |
- name: Setup the environment (without Nix) | |
if: matrix.systems.system == 'x86_64-windows' | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-hack,cargo-nextest | |
- name: Build and run the tests (with Nix) | |
if: matrix.systems.system != 'x86_64-windows' | |
run: nix develop .#ci -c cargo xtask check test | |
- name: Build and run the tests (without Nix) | |
if: matrix.systems.system == 'x86_64-windows' | |
run: cargo xtask check test |