|
6 | 6 | test: |
7 | 7 | name: Test |
8 | 8 | runs-on: ${{ matrix.os }} |
9 | | - |
10 | 9 | strategy: |
11 | 10 | matrix: |
12 | | - os: [ubuntu-latest, macos-latest] |
13 | | - # os: [ubuntu-latest, macos-latest, windows-latest] |
14 | | - |
| 11 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v4 |
| 14 | + with: |
| 15 | + submodules: recursive |
| 16 | + fetch-depth: 0 |
| 17 | + |
| 18 | + - uses: oven-sh/setup-bun@v1 |
| 19 | + with: |
| 20 | + bun-version: latest |
| 21 | + |
| 22 | + - run: bun install |
| 23 | + - run: bun run test |
| 24 | + |
| 25 | + - uses: actions-rs/toolchain@v1 |
| 26 | + with: |
| 27 | + toolchain: stable |
| 28 | + override: true |
| 29 | + components: clippy |
| 30 | + |
| 31 | + - run: cargo build |
| 32 | + - run: cargo clippy -- -D warnings |
| 33 | + - run: cargo test --workspace |
| 34 | + |
| 35 | + rustfmt: |
| 36 | + name: Rustfmt check (nightly) |
| 37 | + runs-on: ubuntu-latest # Only need one OS for style checks |
15 | 38 | steps: |
16 | | - - name: Checkout code |
17 | | - uses: actions/checkout@v4 |
18 | | - with: |
19 | | - submodules: recursive |
20 | | - fetch-depth: 0 |
21 | | - |
22 | | - - name: Set up Bun |
23 | | - uses: oven-sh/setup-bun@v2 |
24 | | - with: |
25 | | - bun-version: latest |
26 | | - |
27 | | - - name: Install dependencies |
28 | | - run: bun install |
29 | | - |
30 | | - - name: Run JavaScript/TypeScript tests |
31 | | - run: bun run test |
32 | | - |
33 | | - - name: Set up Rust |
34 | | - uses: actions-rs/toolchain@v1 |
35 | | - with: |
36 | | - toolchain: nightly |
37 | | - override: true |
38 | | - components: rustfmt, clippy |
39 | | - |
40 | | - - name: Build Rust project |
41 | | - run: cargo build |
42 | | - shell: bash |
43 | | - |
44 | | - - name: Run Clippy |
45 | | - run: cargo clippy -- -D warnings |
46 | | - shell: bash |
47 | | - |
48 | | - - name: Check Formatting |
49 | | - run: cargo fmt -- --check |
50 | | - shell: bash |
51 | | - |
52 | | - # Install cargo-tarpaulin |
53 | | - - name: Install cargo-tarpaulin |
54 | | - run: cargo install cargo-tarpaulin |
55 | | - |
56 | | - # Run tarpaulin to calculate and enforce coverage |
57 | | - - name: Run Coverage and Enforce Threshold |
58 | | - run: cargo tarpaulin |
59 | | - # run: cargo tarpaulin --fail-under 95 |
60 | | - shell: bash |
| 39 | + - uses: actions/checkout@v4 |
| 40 | + with: |
| 41 | + submodules: recursive |
| 42 | + fetch-depth: 0 |
| 43 | + |
| 44 | + - uses: actions-rs/toolchain@v1 |
| 45 | + with: |
| 46 | + toolchain: nightly |
| 47 | + override: true |
| 48 | + components: rustfmt |
| 49 | + |
| 50 | + - run: cargo fmt --all -- --check |
0 commit comments