mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
Update GitHub Actions (#2998)
* Update Workflow. * Fix Workflows. * Enables dependabot for github actions. * Fix workflow.
This commit is contained in:
parent
088de141e2
commit
5ca91298e9
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@ -26,3 +26,9 @@ updates:
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
target-branch: "master"
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
target-branch: "master"
|
||||
|
||||
5
.github/workflows/benchmark-ssr.yml
vendored
5
.github/workflows/benchmark-ssr.yml
vendored
@ -32,11 +32,10 @@ jobs:
|
||||
path: current-pr
|
||||
|
||||
- name: Setup toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
target: wasm32-unknown-unknown
|
||||
profile: minimal
|
||||
targets: wasm32-unknown-unknown
|
||||
|
||||
- name: Restore Rust cache for master
|
||||
uses: Swatinem/rust-cache@v1
|
||||
|
||||
7
.github/workflows/benchmark.yml
vendored
7
.github/workflows/benchmark.yml
vendored
@ -65,12 +65,11 @@ jobs:
|
||||
path: "./js-framework-benchmark"
|
||||
ref: 678cd09a8e02b9a01bcb9b71dc9248d17a33ff82
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
target: wasm32-unknown-unknown
|
||||
override: true
|
||||
profile: minimal
|
||||
targets: wasm32-unknown-unknown
|
||||
|
||||
- uses: jetli/wasm-pack-action@v0.3.0
|
||||
with:
|
||||
|
||||
18
.github/workflows/build-api-docs.yml
vendored
18
.github/workflows/build-api-docs.yml
vendored
@ -21,20 +21,24 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: nightly
|
||||
override: true
|
||||
profile: minimal
|
||||
components: rust-docs
|
||||
|
||||
- name: Run cargo doc
|
||||
uses: actions-rs/cargo@v1
|
||||
env:
|
||||
RUSTDOCFLAGS: --cfg documenting --html-before-content ./api-docs/before-content.html --extend-css ./api-docs/styles.css -Z unstable-options --enable-index-page
|
||||
with:
|
||||
command: doc
|
||||
args: -p yew -p yew-macro -p yew-router -p yew-router-macro -p yew-agent --no-deps --all-features
|
||||
run: |
|
||||
cargo doc \
|
||||
--no-deps \
|
||||
--all-features \
|
||||
-p yew \
|
||||
-p yew-macro \
|
||||
-p yew-router \
|
||||
-p yew-router-macro \
|
||||
-p yew-agent
|
||||
|
||||
- name: Move files in correct directory
|
||||
run: |
|
||||
|
||||
12
.github/workflows/fmt.yml
vendored
12
.github/workflows/fmt.yml
vendored
@ -14,16 +14,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: nightly
|
||||
override: true
|
||||
profile: minimal
|
||||
components: rustfmt
|
||||
|
||||
- name: Run fmt
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
toolchain: nightly
|
||||
args: --all -- --check
|
||||
run: cargo +nightly fmt --all -- --check --unstable-features
|
||||
|
||||
@ -16,12 +16,10 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
profile: minimal
|
||||
|
||||
- name: Build changelog generator
|
||||
run: cargo build --release -p changelog
|
||||
|
||||
79
.github/workflows/main-checks.yml
vendored
79
.github/workflows/main-checks.yml
vendored
@ -22,20 +22,17 @@ jobs:
|
||||
- release
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
profile: minimal
|
||||
components: clippy
|
||||
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
|
||||
- name: Run clippy
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: --all-targets --all-features --profile ${{ matrix.profile }} -- -D warnings
|
||||
run: cargo clippy --all-targets --all-features --profile ${{ matrix.profile }} -- -D warnings
|
||||
|
||||
- name: Lint feature soundness
|
||||
if: matrix.profile == 'dev'
|
||||
@ -64,48 +61,39 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
profile: minimal
|
||||
|
||||
# perhaps extract it into its own little action?
|
||||
- uses: actions-rs/toolchain@v1
|
||||
# for wasm-bindgen-cli, always use stable rust
|
||||
# for wasm-bindgen-cli, always use stable rust
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
|
||||
- name: Install wasm-bindgen-cli
|
||||
shell: bash
|
||||
run: ./ci/install-wasm-bindgen-cli.sh
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: nightly
|
||||
target: wasm32-unknown-unknown
|
||||
override: true
|
||||
profile: minimal
|
||||
targets: wasm32-unknown-unknown
|
||||
|
||||
- uses: browser-actions/setup-geckodriver@latest
|
||||
- uses: nanasess/setup-chromedriver@v1
|
||||
|
||||
- name: Run doctest
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --doc --workspace --exclude yew --target wasm32-unknown-unknown
|
||||
run: cargo test --doc --workspace --exclude yew --target wasm32-unknown-unknown
|
||||
|
||||
- name: Run website code snippet tests
|
||||
run: cargo test -p website-test --target wasm32-unknown-unknown
|
||||
working-directory: tools
|
||||
|
||||
- name: Run doctest - yew with features
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: -p yew --doc --all-features --target wasm32-unknown-unknown
|
||||
run: cargo test -p yew --doc --all-features --target wasm32-unknown-unknown
|
||||
|
||||
integration_tests:
|
||||
name: Integration Tests on ${{ matrix.toolchain }}
|
||||
@ -123,22 +111,21 @@ jobs:
|
||||
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
# for wasm-bindgen-cli, always use stable rust
|
||||
# for wasm-bindgen-cli, always use stable rust
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
|
||||
- name: Install wasm-bindgen-cli
|
||||
shell: bash
|
||||
run: ./ci/install-wasm-bindgen-cli.sh
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
target: wasm32-unknown-unknown
|
||||
override: true
|
||||
profile: minimal
|
||||
targets: wasm32-unknown-unknown
|
||||
|
||||
- uses: browser-actions/setup-geckodriver@latest
|
||||
- uses: nanasess/setup-chromedriver@v1
|
||||
@ -171,33 +158,26 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
override: true
|
||||
profile: minimal
|
||||
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
|
||||
- name: Run native tests
|
||||
uses: actions-rs/cargo@v1
|
||||
env:
|
||||
# workaround for lack of ternary operator
|
||||
# see https://github.com/orgs/community/discussions/25725
|
||||
RUSTFLAGS: ${{ matrix.toolchain == 'nightly' && '--cfg nightly_yew' || '' }}
|
||||
with:
|
||||
command: test
|
||||
args: --all-targets --workspace --exclude yew
|
||||
run: cargo test --all-targets --workspace --exclude yew
|
||||
|
||||
- name: Run native tests for yew
|
||||
uses: actions-rs/cargo@v1
|
||||
env:
|
||||
# workaround for lack of ternary operator
|
||||
# see https://github.com/orgs/community/discussions/25725
|
||||
RUSTFLAGS: ${{ matrix.toolchain == 'nightly' && '--cfg nightly_yew' || '' }}
|
||||
with:
|
||||
command: test
|
||||
args: -p yew --all-features
|
||||
run: cargo test -p yew --all-features
|
||||
|
||||
test-lints:
|
||||
name: Test lints on nightly
|
||||
@ -205,18 +185,15 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: nightly
|
||||
override: true
|
||||
profile: minimal
|
||||
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
|
||||
- name: Run tests
|
||||
uses: actions-rs/cargo@v1
|
||||
env:
|
||||
RUSTFLAGS: --cfg nightly_yew --cfg yew_lints
|
||||
with:
|
||||
command: test
|
||||
args: -p yew-macro test_html_lints
|
||||
run: cargo test -p yew-macro test_html_lints
|
||||
|
||||
8
.github/workflows/publish-examples.yml
vendored
8
.github/workflows/publish-examples.yml
vendored
@ -16,13 +16,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: nightly
|
||||
target: wasm32-unknown-unknown
|
||||
targets: wasm32-unknown-unknown
|
||||
components: rust-src
|
||||
override: true
|
||||
profile: minimal
|
||||
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
|
||||
|
||||
6
.github/workflows/publish-yew-agent.yml
vendored
6
.github/workflows/publish-yew-agent.yml
vendored
@ -29,12 +29,10 @@ jobs:
|
||||
with:
|
||||
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
||||
|
||||
- name: Install stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
profile: minimal
|
||||
|
||||
- name: Install cargo binary dependencies
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
|
||||
6
.github/workflows/publish-yew-only.yml
vendored
6
.github/workflows/publish-yew-only.yml
vendored
@ -30,12 +30,10 @@ jobs:
|
||||
with:
|
||||
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
||||
|
||||
- name: Install stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
profile: minimal
|
||||
|
||||
- name: Install cargo binary dependencies
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
|
||||
@ -29,12 +29,10 @@ jobs:
|
||||
with:
|
||||
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
||||
|
||||
- name: Install stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
profile: minimal
|
||||
|
||||
- name: Install cargo binary dependencies
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
|
||||
6
.github/workflows/publish-yew-router.yml
vendored
6
.github/workflows/publish-yew-router.yml
vendored
@ -29,12 +29,10 @@ jobs:
|
||||
with:
|
||||
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
||||
|
||||
- name: Install stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
profile: minimal
|
||||
|
||||
- name: Install cargo binary dependencies
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
|
||||
6
.github/workflows/publish-yew.yml
vendored
6
.github/workflows/publish-yew.yml
vendored
@ -29,12 +29,10 @@ jobs:
|
||||
with:
|
||||
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
||||
|
||||
- name: Install stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
profile: minimal
|
||||
|
||||
- name: Install cargo binary dependencies
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
|
||||
6
.github/workflows/size-cmp.yml
vendored
6
.github/workflows/size-cmp.yml
vendored
@ -30,13 +30,11 @@ jobs:
|
||||
path: current-pr
|
||||
|
||||
- name: Setup toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: nightly
|
||||
target: wasm32-unknown-unknown
|
||||
components: rust-src
|
||||
override: true
|
||||
profile: minimal
|
||||
targets: wasm32-unknown-unknown
|
||||
|
||||
- name: Restore Rust cache for master
|
||||
uses: Swatinem/rust-cache@v1
|
||||
|
||||
16
.github/workflows/tools-examples.yml
vendored
16
.github/workflows/tools-examples.yml
vendored
@ -31,25 +31,19 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
override: true
|
||||
profile: minimal
|
||||
components: ${{ matrix.runs }}
|
||||
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
|
||||
- name: Run clippy for ${{ matrix.workspace }}
|
||||
if: matrix.runs == 'clippy'
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: --all-targets --all-features --manifest-path ${{ matrix.workspace }}/Cargo.toml -- -D warnings
|
||||
run: cargo clippy --all-targets --all-features --manifest-path ${{ matrix.workspace }}/Cargo.toml -- -D warnings
|
||||
|
||||
- name: Run fmt for ${{ matrix.workspace }}
|
||||
if: matrix.runs == 'rustfmt'
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all --manifest-path ${{ matrix.workspace }}/Cargo.toml -- --check
|
||||
run: cargo fmt --all --manifest-path ${{ matrix.workspace }}/Cargo.toml -- --check
|
||||
|
||||
10
examples/Cargo.lock
generated
10
examples/Cargo.lock
generated
@ -2876,7 +2876,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "yew"
|
||||
version = "0.19.3"
|
||||
version = "0.20.0"
|
||||
dependencies = [
|
||||
"base64ct",
|
||||
"bincode",
|
||||
@ -2902,7 +2902,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "yew-agent"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"gloo-worker 0.1.2",
|
||||
"yew",
|
||||
@ -2910,7 +2910,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "yew-macro"
|
||||
version = "0.19.3"
|
||||
version = "0.20.0"
|
||||
dependencies = [
|
||||
"boolinator",
|
||||
"once_cell",
|
||||
@ -2923,7 +2923,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "yew-router"
|
||||
version = "0.16.0"
|
||||
version = "0.17.0"
|
||||
dependencies = [
|
||||
"gloo",
|
||||
"js-sys",
|
||||
@ -2939,7 +2939,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "yew-router-macro"
|
||||
version = "0.16.0"
|
||||
version = "0.17.0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user