Skip to content

Commit 8ba08bb

Browse files
committed
chore: add CI
1 parent cc6152c commit 8ba08bb

5 files changed

Lines changed: 165 additions & 0 deletions

File tree

‎.github/renovate.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["github>Boshen/renovate"]
4+
}

‎.github/workflows/ci.yml‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI
2+
3+
permissions: {}
4+
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
types: [opened, synchronize]
9+
push:
10+
branches:
11+
- main
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
15+
cancel-in-progress: ${{ github.ref_name != 'main' }}
16+
17+
defaults:
18+
run:
19+
shell: bash
20+
21+
env:
22+
CARGO_INCREMENTAL: 0
23+
RUSTFLAGS: "-D warnings"
24+
25+
jobs:
26+
test:
27+
name: Test
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
include:
32+
- os: ubuntu-latest
33+
# - os: windows-latest
34+
# - os: macos-14
35+
runs-on: ${{ matrix.os }}
36+
steps:
37+
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
38+
- uses: oxc-project/setup-rust@ecabb7322a2ba5aeedb3612d2a40b86a85cee235 # v1.0.11
39+
with:
40+
save-cache: ${{ github.ref_name == 'main' }}
41+
- run: cargo check --all-targets --all-features
42+
- run: cargo test
43+
44+
lint:
45+
name: Lint
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
49+
50+
- uses: oxc-project/setup-rust@ecabb7322a2ba5aeedb3612d2a40b86a85cee235 # v1.0.11
51+
with:
52+
components: clippy rust-docs rustfmt
53+
54+
- run: |
55+
cargo fmt --check
56+
cargo clippy --all-targets --all-features -- -D warnings
57+
RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --document-private-items
58+
59+
- uses: crate-ci/typos@2d0ce569feab1f8752f1dde43cc2f2aa53236e06 # v1.40.0
60+
with:
61+
files: .

‎.github/workflows/deny.yml‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Cargo Deny
2+
3+
permissions: {}
4+
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
types: [opened, synchronize]
9+
paths:
10+
- "Cargo.lock"
11+
- "deny.toml"
12+
- ".github/workflows/deny.yml"
13+
push:
14+
branches:
15+
- main
16+
paths:
17+
- "Cargo.lock"
18+
- "deny.toml"
19+
- ".github/workflows/deny.yml"
20+
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
23+
cancel-in-progress: ${{ github.ref_name != 'main' }}
24+
25+
jobs:
26+
deny:
27+
name: Cargo Deny
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
31+
32+
- uses: oxc-project/setup-rust@ecabb7322a2ba5aeedb3612d2a40b86a85cee235 # v1.0.11
33+
with:
34+
restore-cache: false
35+
tools: cargo-deny
36+
37+
- run: cargo deny check

‎.github/workflows/release.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release
2+
3+
permissions: {}
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
release-plz:
12+
name: Release-plz
13+
runs-on: ubuntu-latest
14+
permissions:
15+
pull-requests: write
16+
contents: write
17+
id-token: write
18+
steps:
19+
- uses: oxc-project/release-plz@44b98e8dda1a7783d4ec2ef66e2f37a3e8c1c759 # v1.0.4
20+
with:
21+
PAT: ${{ secrets.OXC_BOT_PAT }}

‎.github/workflows/zizmor.yml‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Zizmor
2+
3+
permissions: {}
4+
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
types: [opened, synchronize]
9+
paths:
10+
- ".github/workflows/**"
11+
push:
12+
branches:
13+
- main
14+
paths:
15+
- ".github/workflows/**"
16+
17+
jobs:
18+
zizmor:
19+
name: zizmor
20+
runs-on: ubuntu-latest
21+
permissions:
22+
security-events: write
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
26+
with:
27+
persist-credentials: false
28+
29+
- uses: taiki-e/install-action@61e5998d108b2b55a81b9b386c18bd46e4237e4f # v2.63.1
30+
with:
31+
tool: zizmor
32+
33+
- name: Run zizmor
34+
run: zizmor --format sarif . > results.sarif
35+
env:
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Upload SARIF file
39+
uses: github/codeql-action/upload-sarif@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8
40+
with:
41+
sarif_file: results.sarif
42+
category: zizmor

0 commit comments

Comments
 (0)