Skip to content

Commit 8306196

Browse files
shinaokaclaude
andauthored
ci: add GitHub Actions workflow (rustfmt + nextest) (#2)
Based on tidu-rs CI. Runs formatting check and tests on ubuntu + macos. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 111cd5d commit 8306196

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: read
14+
15+
env:
16+
CARGO_TERM_COLOR: always
17+
18+
jobs:
19+
rustfmt:
20+
name: rustfmt
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: dtolnay/rust-toolchain@stable
25+
with:
26+
components: rustfmt
27+
- uses: Swatinem/rust-cache@v2
28+
- run: cargo fmt --all --check
29+
30+
nextest:
31+
name: nextest (${{ matrix.os }})
32+
runs-on: ${{ matrix.os }}
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
os: [ubuntu-latest, macos-latest]
37+
steps:
38+
- uses: actions/checkout@v4
39+
- uses: dtolnay/rust-toolchain@stable
40+
- uses: Swatinem/rust-cache@v2
41+
- uses: taiki-e/install-action@nextest
42+
43+
- name: Run tests with nextest
44+
run: cargo nextest run --workspace --release --no-fail-fast
45+
46+
- name: Run doctests
47+
run: cargo test --doc --workspace --release

0 commit comments

Comments
 (0)