-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.33 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build and Test
on:
push:
schedule:
- cron: 0 0 * * *
jobs:
check:
name: Check the code
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [stable, beta]
steps:
- name: Install the appropriate Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2
- name: Run rustfmt
run: |
rustup component add rustfmt
mise run format-check
- name: Run clippy
run: |
rustup component add clippy
mise run clippy
test:
name: Test the code
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [stable, beta]
steps:
- name: Install the appropriate Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2
- name: Run cargo test
run: |
mise run test
- name: Ensure index.d.ts is up-to-date after tests were run
run: |
mise run diff