Skip to content

Commit 979ad6c

Browse files
refactor(ci): use GitHub's case function (#4135)
1 parent 5b7cd87 commit 979ad6c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

.github/workflows/main-checks.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,7 @@ jobs:
139139

140140
- name: Run native tests
141141
env:
142-
# workaround for lack of ternary operator
143-
# see https://github.com/orgs/community/discussions/25725
144-
RUSTFLAGS: ${{ matrix.toolchain == 'nightly' && '--cfg nightly_yew' || '' }}
142+
RUSTFLAGS: ${{ case(matrix.toolchain == 'nightly', '--cfg nightly_yew', '') }}
145143
run: |
146144
if [[ "${{ matrix.toolchain }}" == "1.85.0" ]]; then
147145
cargo test --all-targets -p yew-agent -p yew-agent-macro -p yew-router -p yew-link -p yew-link-macro
@@ -151,9 +149,7 @@ jobs:
151149
152150
- name: Run native tests for yew
153151
env:
154-
# workaround for lack of ternary operator
155-
# see https://github.com/orgs/community/discussions/25725
156-
RUSTFLAGS: ${{ matrix.toolchain == 'nightly' && '--cfg nightly_yew' || '' }}
152+
RUSTFLAGS: ${{ case(matrix.toolchain == 'nightly', '--cfg nightly_yew', '') }}
157153
run: cargo test -p yew --all-features
158154

159155
test-lints:

0 commit comments

Comments
 (0)