79 lines
2.0 KiB
YAML
79 lines
2.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
push:
|
|
branches: [master]
|
|
paths-ignore:
|
|
- "website/**"
|
|
- ".github/APPROVED_CONTRIBUTORS"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
conventional-commits:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Validate commit subjects
|
|
if: github.event_name == 'push'
|
|
run: python3 scripts/conventional_commits.py --range "${{ github.event.before }}..${{ github.event.after }}"
|
|
|
|
- name: Validate PR title
|
|
if: github.event_name == 'pull_request'
|
|
run: python3 scripts/conventional_commits.py "${{ github.event.pull_request.title }}"
|
|
|
|
check:
|
|
name: check (${{ matrix.os }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
nextest_filter: all()
|
|
- os: macos-latest
|
|
nextest_filter: not binary(live_handoff)
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Install Rust tools
|
|
uses: taiki-e/install-action@b550161ef8a7bc4f2a671c0b03a18ac9ccedea1e # v2
|
|
with:
|
|
tool: just,cargo-nextest
|
|
|
|
- name: Install Zig
|
|
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
|
|
with:
|
|
version: 0.15.2
|
|
|
|
- name: Install macOS build tools
|
|
if: runner.os == 'macOS'
|
|
run: brew install cmake ninja
|
|
|
|
- name: Restore cargo cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-bin: false
|
|
|
|
- name: Run checks
|
|
run: just ci '${{ matrix.nextest_filter }}'
|