Skip to content

Commit 1caee4d

Browse files
committed
ci: add tests workflow
Run fmt, clippy, workspace tests and the catalog check on pull requests and on main after merge. No build or release artifacts.
1 parent 9e24208 commit 1caee4d

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

‎.github/workflows/tests.yml‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: tests-${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
test:
18+
name: cargo test
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 20
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
24+
with:
25+
persist-credentials: false
26+
27+
- name: Install stable Rust toolchain
28+
uses: dtolnay/rust-toolchain@18f0487477426dce244608110aa2660c2893deb7 # stable
29+
with:
30+
components: rustfmt, clippy
31+
32+
- name: Check formatting
33+
run: cargo fmt --all --check
34+
35+
- name: Run clippy
36+
run: cargo clippy --locked --all-targets -- -D warnings
37+
38+
- name: Run workspace tests
39+
run: cargo test --workspace --locked --no-fail-fast
40+
41+
catalog:
42+
name: catalog metadata
43+
runs-on: ubuntu-latest
44+
timeout-minutes: 5
45+
steps:
46+
- name: Checkout repository
47+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
48+
with:
49+
persist-credentials: false
50+
51+
- name: Validate catalog
52+
run: python3 scripts/generate_catalog.py --check

0 commit comments

Comments
 (0)