Skip to content

Commit 92e3bf0

Browse files
authored
ci: use a single worflow for test, lint, format and docs (#76)
1 parent 0f971c1 commit 92e3bf0

File tree

3 files changed

+57
-73
lines changed

3 files changed

+57
-73
lines changed

.github/workflows/CI.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [opened, synchronize]
7+
paths-ignore:
8+
- '**/*.md'
9+
push:
10+
branches:
11+
- main
12+
paths-ignore:
13+
- '**/*.md'
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
17+
cancel-in-progress: ${{ github.ref_name != 'main' }}
18+
19+
jobs:
20+
test:
21+
name: Test
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: moonrepo/setup-rust@v1
26+
- run: cargo test
27+
28+
format:
29+
name: Format
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: moonrepo/setup-rust@v1
34+
with:
35+
components: rustfmt
36+
- run: cargo fmt -- --check
37+
38+
lint:
39+
name: Lint
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: moonrepo/setup-rust@v1
44+
with:
45+
components: clippy
46+
- run: cargo check
47+
- run: cargo clippy -- -D warnings
48+
49+
docs:
50+
name: Docs
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v4
54+
- uses: moonrepo/setup-rust@v1
55+
with:
56+
components: rust-docs
57+
- run: RUSTDOCFLAGS='-D warnings' cargo doc

.github/workflows/Lint.yaml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/Test.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)