|
7 | 7 | name: Check
|
8 | 8 | runs-on: ubuntu-latest
|
9 | 9 | steps:
|
10 |
| - - uses: actions/checkout@v2 |
11 |
| - - uses: actions-rs/toolchain@v1 |
12 |
| - with: |
13 |
| - profile: minimal |
14 |
| - toolchain: stable |
15 |
| - override: true |
16 |
| - - uses: actions-rs/cargo@v1 |
17 |
| - with: |
18 |
| - command: check |
| 10 | + - uses: actions/checkout@v4 |
| 11 | + - uses: dtolnay/rust-toolchain@stable |
| 12 | + - uses: Swatinem/rust-cache@v2 |
| 13 | + - run: cargo check |
19 | 14 |
|
20 | 15 | fmt:
|
21 | 16 | name: Rustfmt
|
22 | 17 | runs-on: ubuntu-latest
|
23 | 18 | steps:
|
24 |
| - - uses: actions/checkout@v2 |
25 |
| - - uses: actions-rs/toolchain@v1 |
26 |
| - with: |
27 |
| - profile: minimal |
28 |
| - toolchain: stable |
29 |
| - override: true |
30 |
| - - run: rustup component add rustfmt |
31 |
| - - uses: actions-rs/cargo@v1 |
| 19 | + - uses: actions/checkout@v4 |
| 20 | + - uses: dtolnay/rust-toolchain@stable |
32 | 21 | with:
|
33 |
| - command: fmt |
34 |
| - args: -- --check |
| 22 | + components: rustfmt |
| 23 | + - run: cargo fmt -- --check |
35 | 24 |
|
36 | 25 | clippy:
|
37 | 26 | name: Clippy
|
38 | 27 | runs-on: ubuntu-latest
|
39 | 28 | steps:
|
40 |
| - - uses: actions/checkout@v2 |
41 |
| - - uses: actions-rs/toolchain@v1 |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + - uses: dtolnay/rust-toolchain@stable |
42 | 31 | with:
|
43 |
| - profile: minimal |
44 |
| - toolchain: stable |
45 |
| - override: true |
46 |
| - - run: rustup component add clippy |
47 |
| - - uses: actions-rs/cargo@v1 |
48 |
| - with: |
49 |
| - command: clippy |
50 |
| - args: --all-targets -- -D warnings |
| 32 | + components: clippy |
| 33 | + - uses: Swatinem/rust-cache@v2 |
| 34 | + - run: cargo clippy --all-targets -- -D warnings |
51 | 35 |
|
52 | 36 | test:
|
53 | 37 | name: Test
|
54 | 38 | runs-on: ubuntu-latest
|
55 | 39 | env:
|
56 | 40 | RUST_BACKTRACE: "1"
|
57 | 41 | steps:
|
58 |
| - - uses: actions/checkout@v2 |
59 |
| - - uses: actions-rs/toolchain@v1 |
60 |
| - with: |
61 |
| - profile: minimal |
62 |
| - toolchain: stable |
63 |
| - override: true |
64 |
| - - uses: actions-rs/[email protected] |
65 |
| - with: |
66 |
| - crate: sqlx-cli |
67 |
| - use-tool-cache: true |
| 42 | + - uses: actions/checkout@v4 |
| 43 | + - uses: dtolnay/rust-toolchain@stable |
| 44 | + - uses: Swatinem/rust-cache@v2 |
| 45 | + - run: cargo install sqlx-cli --locked |
68 | 46 | - uses: ./.github/actions/postgres
|
69 |
| - - uses: actions-rs/cargo@v1 |
70 |
| - with: |
71 |
| - command: test |
72 |
| - args: -- --nocapture |
| 47 | + - run: cargo test -- --nocapture |
73 | 48 |
|
74 | 49 | test_nightly:
|
75 | 50 | name: Test (Nightly)
|
76 | 51 | runs-on: ubuntu-latest
|
77 | 52 | env:
|
78 | 53 | RUST_BACKTRACE: "1"
|
79 | 54 | steps:
|
80 |
| - - uses: actions/checkout@v2 |
81 |
| - - uses: actions-rs/toolchain@v1 |
82 |
| - with: |
83 |
| - profile: minimal |
84 |
| - toolchain: nightly |
85 |
| - override: true |
86 |
| - - uses: actions-rs/[email protected] |
87 |
| - with: |
88 |
| - crate: sqlx-cli |
89 |
| - use-tool-cache: true |
| 55 | + - uses: actions/checkout@v4 |
| 56 | + - uses: dtolnay/rust-toolchain@nightly |
| 57 | + - uses: Swatinem/rust-cache@v2 |
| 58 | + - run: cargo install sqlx-cli --locked |
90 | 59 | - uses: ./.github/actions/postgres
|
91 |
| - - uses: actions-rs/cargo@v1 |
92 |
| - with: |
93 |
| - command: test |
94 |
| - args: -- --nocapture |
| 60 | + - run: cargo test -- --nocapture |
95 | 61 |
|
96 | 62 | readme:
|
97 | 63 | name: Readme
|
98 | 64 | runs-on: ubuntu-latest
|
99 | 65 | steps:
|
100 |
| - - uses: actions/checkout@v2 |
101 |
| - - name: Install rust stable |
102 |
| - uses: actions-rs/toolchain@v1 |
103 |
| - with: |
104 |
| - profile: minimal |
105 |
| - toolchain: stable |
106 |
| - override: true |
107 |
| - - name: Install cargo-sync-readme |
108 |
| - uses: actions-rs/[email protected] |
109 |
| - with: |
110 |
| - crate: cargo-sync-readme |
111 |
| - version: latest |
112 |
| - use-tool-cache: true |
| 66 | + - uses: actions/checkout@v4 |
| 67 | + - uses: dtolnay/rust-toolchain@stable |
| 68 | + - uses: Swatinem/rust-cache@v2 |
| 69 | + - run: cargo install cargo-sync-readme --locked |
113 | 70 | - name: Sync readme
|
114 | 71 | run: cargo sync-readme -c
|
0 commit comments