68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: windows
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Commit messages
|
|
shell: pwsh
|
|
run: |
|
|
$event = Get-Content -Raw -LiteralPath $env:GITHUB_EVENT_PATH | ConvertFrom-Json
|
|
$range = switch ($env:GITHUB_EVENT_NAME) {
|
|
'pull_request' { "$($event.pull_request.base.sha)..$($event.pull_request.head.sha)" }
|
|
'push' {
|
|
if ($event.before -match '^0+$') {
|
|
$event.after
|
|
}
|
|
elseif (git merge-base --is-ancestor $event.before $event.after) {
|
|
"$($event.before)..$($event.after)"
|
|
}
|
|
else {
|
|
"$($event.after)^..$($event.after)"
|
|
}
|
|
}
|
|
default { 'HEAD' }
|
|
}
|
|
pwsh -NoProfile -File .\scripts\check-conventional-commits.ps1 -Range $range
|
|
|
|
- name: Toolchain snapshot
|
|
shell: pwsh
|
|
run: |
|
|
cargo --version
|
|
rustc --version
|
|
cargo nextest --version
|
|
cargo llvm-cov --version
|
|
just --version
|
|
git --version
|
|
pwsh --version
|
|
|
|
- name: Quick repo gate
|
|
shell: pwsh
|
|
run: just workspace-check
|
|
|
|
- name: Tests
|
|
shell: pwsh
|
|
run: cargo nextest run --all-features
|
|
|
|
- name: Clippy
|
|
shell: pwsh
|
|
run: cargo clippy --all-targets --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery
|
|
|
|
- name: Packaging ecosystem
|
|
shell: pwsh
|
|
run: just ecosystem-fast
|