Skip to content

Commit e93c9b8

Browse files
futursoloWorldSEnder
authored andcommitted
Update GitHub Actions (yewstack#2998)
* Update Workflow. * Fix Workflows. * Enables dependabot for github actions. * Fix workflow.
1 parent fb4519b commit e93c9b8

16 files changed

+82
-121
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@ updates:
2626
schedule:
2727
interval: "monthly"
2828
target-branch: "master"
29+
30+
- package-ecosystem: "github-actions"
31+
directory: "/"
32+
schedule:
33+
interval: "monthly"
34+
target-branch: "master"

.github/workflows/benchmark-ssr.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ jobs:
3232
path: current-pr
3333

3434
- name: Setup toolchain
35-
uses: actions-rs/toolchain@v1
35+
uses: dtolnay/rust-toolchain@master
3636
with:
3737
toolchain: stable
38-
target: wasm32-unknown-unknown
39-
profile: minimal
38+
targets: wasm32-unknown-unknown
4039

4140
- name: Restore Rust cache for master
4241
uses: Swatinem/rust-cache@v1

.github/workflows/benchmark.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,11 @@ jobs:
6565
path: "./js-framework-benchmark"
6666
ref: 678cd09a8e02b9a01bcb9b71dc9248d17a33ff82
6767

68-
- uses: actions-rs/toolchain@v1
68+
- name: Setup toolchain
69+
uses: dtolnay/rust-toolchain@master
6970
with:
7071
toolchain: stable
71-
target: wasm32-unknown-unknown
72-
override: true
73-
profile: minimal
72+
targets: wasm32-unknown-unknown
7473

7574
- uses: jetli/[email protected]
7675
with:

.github/workflows/build-api-docs.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,24 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v2
2323

24-
- uses: actions-rs/toolchain@v1
24+
- name: Setup toolchain
25+
uses: dtolnay/rust-toolchain@master
2526
with:
2627
toolchain: nightly
27-
override: true
28-
profile: minimal
2928
components: rust-docs
3029

3130
- name: Run cargo doc
32-
uses: actions-rs/cargo@v1
3331
env:
3432
RUSTDOCFLAGS: --cfg documenting --html-before-content ./api-docs/before-content.html --extend-css ./api-docs/styles.css -Z unstable-options --enable-index-page
35-
with:
36-
command: doc
37-
args: -p yew -p yew-macro -p yew-router -p yew-router-macro -p yew-agent --no-deps --all-features
33+
run: |
34+
cargo doc \
35+
--no-deps \
36+
--all-features \
37+
-p yew \
38+
-p yew-macro \
39+
-p yew-router \
40+
-p yew-router-macro \
41+
-p yew-agent
3842
3943
- name: Move files in correct directory
4044
run: |

.github/workflows/fmt.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,12 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v2
17-
- uses: actions-rs/toolchain@v1
17+
18+
- name: Setup toolchain
19+
uses: dtolnay/rust-toolchain@master
1820
with:
1921
toolchain: nightly
20-
override: true
21-
profile: minimal
2222
components: rustfmt
2323

2424
- name: Run fmt
25-
uses: actions-rs/cargo@v1
26-
with:
27-
command: fmt
28-
toolchain: nightly
29-
args: --all -- --check
25+
run: cargo +nightly fmt --all -- --check --unstable-features

.github/workflows/inspect-next-changelogs.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ jobs:
1616
with:
1717
fetch-depth: 0
1818

19-
- name: Install stable toolchain
20-
uses: actions-rs/toolchain@v1
19+
- name: Setup toolchain
20+
uses: dtolnay/rust-toolchain@master
2121
with:
2222
toolchain: stable
23-
override: true
24-
profile: minimal
2523

2624
- name: Build changelog generator
2725
run: cargo build --release -p changelog

.github/workflows/main-checks.yml

Lines changed: 28 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,17 @@ jobs:
2222
- release
2323
steps:
2424
- uses: actions/checkout@v2
25-
- uses: actions-rs/toolchain@v1
25+
26+
- name: Setup toolchain
27+
uses: dtolnay/rust-toolchain@master
2628
with:
2729
toolchain: stable
28-
override: true
29-
profile: minimal
3030
components: clippy
3131

3232
- uses: Swatinem/rust-cache@v1
3333

3434
- name: Run clippy
35-
uses: actions-rs/cargo@v1
36-
with:
37-
command: clippy
38-
args: --all-targets --all-features --profile ${{ matrix.profile }} -- -D warnings
35+
run: cargo clippy --all-targets --all-features --profile ${{ matrix.profile }} -- -D warnings
3936

4037
- name: Lint feature soundness
4138
if: matrix.profile == 'dev'
@@ -64,48 +61,39 @@ jobs:
6461
- uses: actions/checkout@v2
6562
- uses: Swatinem/rust-cache@v1
6663

67-
- uses: actions-rs/toolchain@v1
64+
- name: Setup toolchain
65+
uses: dtolnay/rust-toolchain@master
6866
with:
6967
toolchain: stable
70-
override: true
71-
profile: minimal
7268

73-
# perhaps extract it into its own little action?
74-
- uses: actions-rs/toolchain@v1
75-
# for wasm-bindgen-cli, always use stable rust
69+
# for wasm-bindgen-cli, always use stable rust
70+
- name: Setup toolchain
71+
uses: dtolnay/rust-toolchain@master
7672
with:
7773
toolchain: stable
78-
profile: minimal
7974

8075
- name: Install wasm-bindgen-cli
8176
shell: bash
8277
run: ./ci/install-wasm-bindgen-cli.sh
8378

84-
- uses: actions-rs/toolchain@v1
79+
- name: Setup toolchain
80+
uses: dtolnay/rust-toolchain@master
8581
with:
8682
toolchain: nightly
87-
target: wasm32-unknown-unknown
88-
override: true
89-
profile: minimal
83+
targets: wasm32-unknown-unknown
9084

9185
- uses: browser-actions/setup-geckodriver@latest
9286
- uses: nanasess/setup-chromedriver@v1
9387

9488
- name: Run doctest
95-
uses: actions-rs/cargo@v1
96-
with:
97-
command: test
98-
args: --doc --workspace --exclude yew --target wasm32-unknown-unknown
89+
run: cargo test --doc --workspace --exclude yew --target wasm32-unknown-unknown
9990

10091
- name: Run website code snippet tests
10192
run: cargo test -p website-test --target wasm32-unknown-unknown
10293
working-directory: tools
10394

10495
- name: Run doctest - yew with features
105-
uses: actions-rs/cargo@v1
106-
with:
107-
command: test
108-
args: -p yew --doc --all-features --target wasm32-unknown-unknown
96+
run: cargo test -p yew --doc --all-features --target wasm32-unknown-unknown
10997

11098
integration_tests:
11199
name: Integration Tests on ${{ matrix.toolchain }}
@@ -123,22 +111,21 @@ jobs:
123111

124112
- uses: Swatinem/rust-cache@v1
125113

126-
- uses: actions-rs/toolchain@v1
127-
# for wasm-bindgen-cli, always use stable rust
114+
# for wasm-bindgen-cli, always use stable rust
115+
- name: Setup toolchain
116+
uses: dtolnay/rust-toolchain@master
128117
with:
129118
toolchain: stable
130-
profile: minimal
131119

132120
- name: Install wasm-bindgen-cli
133121
shell: bash
134122
run: ./ci/install-wasm-bindgen-cli.sh
135123

136-
- uses: actions-rs/toolchain@v1
124+
- name: Setup toolchain
125+
uses: dtolnay/rust-toolchain@master
137126
with:
138127
toolchain: ${{ matrix.toolchain }}
139-
target: wasm32-unknown-unknown
140-
override: true
141-
profile: minimal
128+
targets: wasm32-unknown-unknown
142129

143130
- uses: browser-actions/setup-geckodriver@latest
144131
- uses: nanasess/setup-chromedriver@v1
@@ -171,52 +158,42 @@ jobs:
171158
with:
172159
fetch-depth: 0
173160

174-
- uses: actions-rs/toolchain@v1
161+
- name: Setup toolchain
162+
uses: dtolnay/rust-toolchain@master
175163
with:
176164
toolchain: ${{ matrix.toolchain }}
177-
override: true
178-
profile: minimal
179165

180166
- uses: Swatinem/rust-cache@v1
181167

182168
- name: Run native tests
183-
uses: actions-rs/cargo@v1
184169
env:
185170
# workaround for lack of ternary operator
186171
# see https://github.com/orgs/community/discussions/25725
187172
RUSTFLAGS: ${{ matrix.toolchain == 'nightly' && '--cfg nightly_yew' || '' }}
188-
with:
189-
command: test
190-
args: --all-targets --workspace --exclude yew
173+
run: cargo test --all-targets --workspace --exclude yew
191174

192175
- name: Run native tests for yew
193-
uses: actions-rs/cargo@v1
194176
env:
195177
# workaround for lack of ternary operator
196178
# see https://github.com/orgs/community/discussions/25725
197179
RUSTFLAGS: ${{ matrix.toolchain == 'nightly' && '--cfg nightly_yew' || '' }}
198-
with:
199-
command: test
200-
args: -p yew --all-features
180+
run: cargo test -p yew --all-features
201181

202182
test-lints:
203183
name: Test lints on nightly
204184
runs-on: ubuntu-latest
205185

206186
steps:
207187
- uses: actions/checkout@v2
208-
- uses: actions-rs/toolchain@v1
188+
189+
- name: Setup toolchain
190+
uses: dtolnay/rust-toolchain@master
209191
with:
210192
toolchain: nightly
211-
override: true
212-
profile: minimal
213193

214194
- uses: Swatinem/rust-cache@v1
215195

216196
- name: Run tests
217-
uses: actions-rs/cargo@v1
218197
env:
219198
RUSTFLAGS: --cfg nightly_yew --cfg yew_lints
220-
with:
221-
command: test
222-
args: -p yew-macro test_html_lints
199+
run: cargo test -p yew-macro test_html_lints

.github/workflows/publish-examples.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@v2
19-
- uses: actions-rs/toolchain@v1
19+
20+
- name: Setup toolchain
21+
uses: dtolnay/rust-toolchain@master
2022
with:
2123
toolchain: nightly
22-
target: wasm32-unknown-unknown
24+
targets: wasm32-unknown-unknown
2325
components: rust-src
24-
override: true
25-
profile: minimal
2626

2727
- uses: Swatinem/rust-cache@v1
2828

.github/workflows/publish-yew-agent.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@ jobs:
2929
with:
3030
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
3131

32-
- name: Install stable toolchain
33-
uses: actions-rs/toolchain@v1
32+
- name: Setup toolchain
33+
uses: dtolnay/rust-toolchain@master
3434
with:
3535
toolchain: stable
36-
override: true
37-
profile: minimal
3836

3937
- name: Install cargo binary dependencies
4038
uses: baptiste0928/cargo-install@v1

.github/workflows/publish-yew-only.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@ jobs:
3030
with:
3131
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
3232

33-
- name: Install stable toolchain
34-
uses: actions-rs/toolchain@v1
33+
- name: Setup toolchain
34+
uses: dtolnay/rust-toolchain@master
3535
with:
3636
toolchain: stable
37-
override: true
38-
profile: minimal
3937

4038
- name: Install cargo binary dependencies
4139
uses: baptiste0928/cargo-install@v1

0 commit comments

Comments
 (0)