Skip to content

Commit 387b301

Browse files
committed
Fix CI (#49)
1 parent c1d7ad4 commit 387b301

File tree

2 files changed

+32
-88
lines changed

2 files changed

+32
-88
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,10 @@ jobs:
99
name: Release
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions-rs/toolchain@v1
14-
with:
15-
profile: minimal
16-
toolchain: stable
17-
override: true
18-
- uses: actions-rs/cargo@v1
19-
with:
20-
command: login
21-
args: -- ${{secrets.CARGO_TOKEN}}
22-
- uses: actions-rs/cargo@v1
23-
with:
24-
command: publish
25-
args: --manifest-path sqlxmq_macros/Cargo.toml
12+
- uses: actions/checkout@v4
13+
- uses: dtolnay/rust-toolchain@stable
14+
- run: cargo login ${{secrets.CARGO_TOKEN}}
15+
- run: cargo publish --manifest-path sqlxmq_macros/Cargo.toml
2616
- name: Wait for crates.io to update
2717
run: sleep 30
28-
- uses: actions-rs/cargo@v1
29-
with:
30-
command: publish
31-
args: --manifest-path Cargo.toml
18+
- run: cargo publish --manifest-path Cargo.toml

.github/workflows/toolchain.yml

Lines changed: 27 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -7,108 +7,65 @@ jobs:
77
name: Check
88
runs-on: ubuntu-latest
99
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
1914

2015
fmt:
2116
name: Rustfmt
2217
runs-on: ubuntu-latest
2318
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
3221
with:
33-
command: fmt
34-
args: -- --check
22+
components: rustfmt
23+
- run: cargo fmt -- --check
3524

3625
clippy:
3726
name: Clippy
3827
runs-on: ubuntu-latest
3928
steps:
40-
- uses: actions/checkout@v2
41-
- uses: actions-rs/toolchain@v1
29+
- uses: actions/checkout@v4
30+
- uses: dtolnay/rust-toolchain@stable
4231
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
5135

5236
test:
5337
name: Test
5438
runs-on: ubuntu-latest
5539
env:
5640
RUST_BACKTRACE: "1"
5741
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
6846
- uses: ./.github/actions/postgres
69-
- uses: actions-rs/cargo@v1
70-
with:
71-
command: test
72-
args: -- --nocapture
47+
- run: cargo test -- --nocapture
7348

7449
test_nightly:
7550
name: Test (Nightly)
7651
runs-on: ubuntu-latest
7752
env:
7853
RUST_BACKTRACE: "1"
7954
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
9059
- uses: ./.github/actions/postgres
91-
- uses: actions-rs/cargo@v1
92-
with:
93-
command: test
94-
args: -- --nocapture
60+
- run: cargo test -- --nocapture
9561

9662
readme:
9763
name: Readme
9864
runs-on: ubuntu-latest
9965
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
11370
- name: Sync readme
11471
run: cargo sync-readme -c

0 commit comments

Comments
 (0)