mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-15 11:17:58 +01:00
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: ["develop"]
|
|
pull_request:
|
|
branches: ["develop"]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
rust: [default, msrv]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Nix
|
|
uses: nixbuild/nix-quick-install-action@v31
|
|
|
|
- name: Setup Nix cache
|
|
uses: nix-community/cache-nix-action@v6
|
|
with:
|
|
primary-key: nix-${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
|
|
restore-prefixes-first-match: nix-${{ runner.os }}-${{ matrix.rust }}-
|
|
|
|
- name: Build
|
|
run: nix develop .#${{ matrix.rust }} --command cargo build --verbose
|
|
|
|
- name: Run cargo tests
|
|
run: nix develop .#${{ matrix.rust }} --command cargo test --verbose
|
|
|
|
- name: Run integration tests
|
|
run: nix develop .#${{ matrix.rust }} --command tests/integration.sh
|
|
|
|
- name: Check formatting
|
|
run: nix develop .#${{ matrix.rust }} --command cargo fmt --check
|
|
|
|
- name: Lint with clippy
|
|
run: nix develop .#${{ matrix.rust }} --command cargo clippy
|