mirror of
https://github.com/vhaudiquet/ecrou.git
synced 2026-11-12 22:22:44 +00:00
ci: add testing and snap release workflows
Testing runs the pre-commit trio on pushes to main and PRs. Releasing builds the snap on plain vX tags and publishes it to the stable store channel; rc tags fail the version gate and leave the publish job skipped.
This commit is contained in:
1 parent
8a0521ae76
commit
7c50b19c09
2 files changed
+93
No files matched your search
@@ -0,0 +1,39 @@
|
||||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: fmt, clippy, test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy, rustfmt
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
# Same order as the pre-commit list in AGENTS.md.
|
||||
- name: cargo fmt
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: cargo clippy
|
||||
run: cargo clippy --all-targets -- -D warnings
|
||||
|
||||
- name: cargo test
|
||||
run: cargo test
|
||||
Reference in new issue
Block a user