Files

47 lines
1.3 KiB
YAML

name: ci
on:
push:
branches: ["**"]
# One build at a time on the shared runner: a second run waits for the first.
concurrency:
group: gites-build
cancel-in-progress: false
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# The same tool cache as in release.yaml: the same key and the same folders, or
# neither job can use what the other saved.
- name: Restore tool cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/registry
~/.cargo/git
~/.rustup
~/.local/bin/mise
~/.local/share/mise
key: tools-${{ hashFiles('scripts/ci-setup.sh', 'mise.toml') }}
# After a change to mise.toml, start from the last tools; mise installs only what changed.
restore-keys: |
tools-
- name: Restore build cache
uses: actions/cache@v4
with:
path: src-tauri/target
key: target-check-${{ hashFiles('src-tauri/Cargo.lock') }}-${{ github.sha }}
restore-keys: |
target-check-${{ hashFiles('src-tauri/Cargo.lock') }}-
target-check-
- name: Install tools
run: scripts/ci-setup.sh
- name: Unit tests
run: mise run test
- name: Type checks
run: mise run check