name: CI
on:
push:
branches: [ "main" ]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CARGO_TERM_COLOR: always
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Cache
uses: actions/cache@v5.0.1
with:
path: |
~/.cargo/bin
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: git --version
- run: make test-depend
- run: xvfb-run make test
test:
strategy:
matrix:
os:
- windows-latest
- macos-latest
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Cache
uses: actions/cache@v5.0.1
with:
path: |
~/.cargo/bin
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- if: runner.os == 'Windows'
shell: bash
run: echo 'C:\Program Files\Git\usr\bin' >> "$GITHUB_PATH"
- run: git --version
- run: cargo test