mirror of https://github.com/yewstack/yew
Fix Dependabot and GitHub Actions (#3111)
This commit is contained in:
parent
48daf52986
commit
08f4fd3032
|
@ -1,5 +1,7 @@
|
||||||
[target.'cfg(target_arch = "wasm32")']
|
[target.'cfg(target_arch = "wasm32")']
|
||||||
runner = 'wasm-bindgen-test-runner'
|
runner = 'wasm-bindgen-test-runner'
|
||||||
|
|
||||||
|
# This section needs to be last.
|
||||||
|
# GitHub Actions modifies this section.
|
||||||
[unstable]
|
[unstable]
|
||||||
doctest-xcompile = true
|
doctest-xcompile = true
|
||||||
|
|
|
@ -6,20 +6,6 @@ updates:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
day: "friday"
|
day: "friday"
|
||||||
open-pull-requests-limit: 5
|
open-pull-requests-limit: 5
|
||||||
|
|
||||||
- package-ecosystem: "cargo"
|
|
||||||
directory: "/examples"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
day: "friday"
|
|
||||||
open-pull-requests-limit: 5
|
|
||||||
|
|
||||||
- package-ecosystem: "cargo"
|
|
||||||
directory: "/tools"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
day: "friday"
|
|
||||||
open-pull-requests-limit: 5
|
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/website"
|
directory: "/website"
|
||||||
|
|
|
@ -22,7 +22,7 @@ jobs:
|
||||||
- name: Checkout master
|
- name: Checkout master
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: 'yewstack/yew'
|
repository: "yewstack/yew"
|
||||||
ref: master
|
ref: master
|
||||||
path: yew-master
|
path: yew-master
|
||||||
|
|
||||||
|
@ -50,12 +50,12 @@ jobs:
|
||||||
key: pr
|
key: pr
|
||||||
|
|
||||||
- name: Run pull request benchmark
|
- name: Run pull request benchmark
|
||||||
run: cargo run --profile=bench --bin benchmark-ssr -- --output-path ./output.json
|
run: cargo run --profile=bench -- --output-path ../output.json
|
||||||
working-directory: current-pr/tools
|
working-directory: current-pr/tools/benchmark-ssr
|
||||||
|
|
||||||
- name: Run master benchmark
|
- name: Run master benchmark
|
||||||
run: cargo run --profile=bench --bin benchmark-ssr -- --output-path ./output.json
|
run: cargo run --profile=bench -- --output-path ../output.json
|
||||||
working-directory: yew-master/tools
|
working-directory: yew-master/tools/benchmark-ssr
|
||||||
|
|
||||||
- name: Write Pull Request ID
|
- name: Write Pull Request ID
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
name: Clippy
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- ".github/workflows/clippy.yml"
|
||||||
|
- "tools/**/*"
|
||||||
|
- "examples/**/*"
|
||||||
|
- "packages/**/*"
|
||||||
|
- "Cargo.toml"
|
||||||
|
- "Cargo.lock"
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
feature-soundness:
|
||||||
|
name: Feature Soundness
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
profile:
|
||||||
|
- dev
|
||||||
|
- release
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
components: clippy
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
|
- name: Lint feature soundness
|
||||||
|
if: matrix.profile == 'dev'
|
||||||
|
run: bash ../../ci/feature-soundness.sh
|
||||||
|
working-directory: packages/yew
|
||||||
|
|
||||||
|
- name: Lint feature soundness
|
||||||
|
if: matrix.profile == 'release'
|
||||||
|
run: bash ../../ci/feature-soundness-release.sh
|
||||||
|
working-directory: packages/yew
|
||||||
|
|
||||||
|
- name: Run release clippy
|
||||||
|
if: matrix.profile == 'release'
|
||||||
|
run: |
|
||||||
|
ls packages | xargs -I {} \
|
||||||
|
cargo clippy \
|
||||||
|
-p {} \
|
||||||
|
--all-targets \
|
||||||
|
--all-features \
|
||||||
|
--workspace \
|
||||||
|
-- -D warnings
|
||||||
|
|
||||||
|
clippy:
|
||||||
|
name: Clippy Workspace
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
toolchain:
|
||||||
|
- stable
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: ${{ matrix.toolchain }}
|
||||||
|
components: clippy
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
|
- name: Run clippy
|
||||||
|
run: |
|
||||||
|
cargo clippy \
|
||||||
|
--all-targets \
|
||||||
|
--all-features \
|
||||||
|
--workspace \
|
||||||
|
-- -D warnings
|
|
@ -3,47 +3,15 @@ name: Main Checks
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/main-checks.yml'
|
- ".github/workflows/main-checks.yml"
|
||||||
- 'ci/**'
|
- "ci/**"
|
||||||
- 'packages/**/*'
|
- "packages/**/*"
|
||||||
- 'Cargo.toml'
|
- "Cargo.toml"
|
||||||
|
- "Cargo.lock"
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clippy:
|
|
||||||
name: Clippy
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
profile:
|
|
||||||
- dev
|
|
||||||
- release
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
components: clippy
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Run clippy
|
|
||||||
run: cargo clippy --all-targets --all-features --profile ${{ matrix.profile }} -- -D warnings
|
|
||||||
|
|
||||||
- name: Lint feature soundness
|
|
||||||
if: matrix.profile == 'dev'
|
|
||||||
run: bash ../../ci/feature-soundness.sh
|
|
||||||
working-directory: packages/yew
|
|
||||||
|
|
||||||
- name: Lint feature soundness
|
|
||||||
if: matrix.profile == 'release'
|
|
||||||
run: bash ../../ci/feature-soundness-release.sh
|
|
||||||
working-directory: packages/yew
|
|
||||||
|
|
||||||
spell_check:
|
spell_check:
|
||||||
name: spellcheck
|
name: spellcheck
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -61,11 +29,6 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Setup toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
|
|
||||||
# for wasm-bindgen-cli, always use stable rust
|
# for wasm-bindgen-cli, always use stable rust
|
||||||
- name: Setup toolchain
|
- name: Setup toolchain
|
||||||
uses: dtolnay/rust-toolchain@master
|
uses: dtolnay/rust-toolchain@master
|
||||||
|
@ -83,17 +46,18 @@ jobs:
|
||||||
targets: wasm32-unknown-unknown
|
targets: wasm32-unknown-unknown
|
||||||
|
|
||||||
- uses: browser-actions/setup-geckodriver@latest
|
- uses: browser-actions/setup-geckodriver@latest
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- uses: nanasess/setup-chromedriver@v1
|
- uses: nanasess/setup-chromedriver@v1
|
||||||
|
|
||||||
- name: Run doctest
|
- name: Run doctest
|
||||||
run: cargo test --doc --workspace --exclude yew --target wasm32-unknown-unknown
|
run: |
|
||||||
|
ls packages | xargs -I {} \
|
||||||
- name: Run website code snippet tests
|
cargo test \
|
||||||
run: cargo test -p website-test --target wasm32-unknown-unknown
|
-p {} \
|
||||||
working-directory: tools
|
--doc \
|
||||||
|
--all-features \
|
||||||
- name: Run doctest - yew with features
|
--target wasm32-unknown-unknown
|
||||||
run: cargo test -p yew --doc --all-features --target wasm32-unknown-unknown
|
|
||||||
|
|
||||||
integration_tests:
|
integration_tests:
|
||||||
name: Integration Tests on ${{ matrix.toolchain }}
|
name: Integration Tests on ${{ matrix.toolchain }}
|
||||||
|
@ -128,6 +92,9 @@ jobs:
|
||||||
targets: wasm32-unknown-unknown
|
targets: wasm32-unknown-unknown
|
||||||
|
|
||||||
- uses: browser-actions/setup-geckodriver@latest
|
- uses: browser-actions/setup-geckodriver@latest
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- uses: nanasess/setup-chromedriver@v1
|
- uses: nanasess/setup-chromedriver@v1
|
||||||
|
|
||||||
- name: Run tests - yew
|
- name: Run tests - yew
|
||||||
|
@ -170,7 +137,7 @@ jobs:
|
||||||
# workaround for lack of ternary operator
|
# workaround for lack of ternary operator
|
||||||
# see https://github.com/orgs/community/discussions/25725
|
# see https://github.com/orgs/community/discussions/25725
|
||||||
RUSTFLAGS: ${{ matrix.toolchain == 'nightly' && '--cfg nightly_yew' || '' }}
|
RUSTFLAGS: ${{ matrix.toolchain == 'nightly' && '--cfg nightly_yew' || '' }}
|
||||||
run: cargo test --all-targets --workspace --exclude yew
|
run: ls packages | grep -v "^yew$" | xargs -I {} cargo test --all-targets -p {}
|
||||||
|
|
||||||
- name: Run native tests for yew
|
- name: Run native tests for yew
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Config Git
|
- name: Config Git
|
||||||
uses: oleksiyrudenko/gha-git-credentials@v2-latest
|
uses: oleksiyrudenko/gha-git-credentials@v2.1.1
|
||||||
with:
|
with:
|
||||||
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
token: "${{ secrets.YEWTEMPBOT_TOKEN }}"
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,12 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
if: ${{ matrix.target == 'pr' }}
|
if: ${{ matrix.target == 'pr' }}
|
||||||
|
|
||||||
|
- name: Write Optimisation Flags
|
||||||
|
run: |
|
||||||
|
echo 'share-generics = true' >> .cargo/config.toml
|
||||||
|
echo 'build-std = ["std", "panic_abort"]' >> .cargo/config.toml
|
||||||
|
echo 'build-std-features = ["panic_immediate_abort"]' >> .cargo/config.toml
|
||||||
|
|
||||||
- name: Setup toolchain
|
- name: Setup toolchain
|
||||||
uses: dtolnay/rust-toolchain@master
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
---
|
||||||
|
name: "Test Website"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- ".github/workflows/test-website.yml"
|
||||||
|
- "packages/**/*"
|
||||||
|
- "website/**/*"
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
website_tests:
|
||||||
|
name: Tests Website Snippets
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
# for wasm-bindgen-cli, always use stable rust
|
||||||
|
- name: Setup toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: Install wasm-bindgen-cli
|
||||||
|
shell: bash
|
||||||
|
run: ./ci/install-wasm-bindgen-cli.sh
|
||||||
|
|
||||||
|
- name: Setup toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: nightly
|
||||||
|
targets: wasm32-unknown-unknown
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
|
- uses: browser-actions/setup-geckodriver@latest
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: nanasess/setup-chromedriver@v1
|
||||||
|
|
||||||
|
- name: Run website code snippet tests
|
||||||
|
run: cargo test -p website-test --target wasm32-unknown-unknown
|
|
@ -1,49 +0,0 @@
|
||||||
name: Tools & Examples
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '.github/workflows/tools-examples.yml'
|
|
||||||
- 'tools/**/*'
|
|
||||||
- 'examples/**/*'
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
clippy-fmt:
|
|
||||||
name: Clippy & Format
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
workspace:
|
|
||||||
- tools
|
|
||||||
- examples
|
|
||||||
runs:
|
|
||||||
- clippy
|
|
||||||
- rustfmt
|
|
||||||
include:
|
|
||||||
- toolchain: stable
|
|
||||||
runs: clippy
|
|
||||||
- toolchain: nightly
|
|
||||||
runs: rustfmt
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.toolchain }}
|
|
||||||
components: ${{ matrix.runs }}
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Run clippy for ${{ matrix.workspace }}
|
|
||||||
if: matrix.runs == 'clippy'
|
|
||||||
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'
|
|
||||||
run: cargo fmt --all --manifest-path ${{ matrix.workspace }}/Cargo.toml -- --check
|
|
|
@ -1,5 +1,4 @@
|
||||||
target/
|
target/
|
||||||
Cargo.lock
|
|
||||||
|
|
||||||
# backup files generated by rustfmt
|
# backup files generated by rustfmt
|
||||||
**/*.rs.bk
|
**/*.rs.bk
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
14
Cargo.toml
14
Cargo.toml
|
@ -1,9 +1,19 @@
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [
|
members = [
|
||||||
"packages/*",
|
"packages/*",
|
||||||
]
|
|
||||||
exclude = [
|
|
||||||
"tools/*",
|
"tools/*",
|
||||||
"examples/*",
|
"examples/*",
|
||||||
]
|
]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
lto = true
|
||||||
|
codegen-units = 1
|
||||||
|
panic = "abort"
|
||||||
|
opt-level = "z"
|
||||||
|
|
||||||
|
[profile.bench]
|
||||||
|
lto = true
|
||||||
|
codegen-units = 1
|
||||||
|
panic = "abort"
|
||||||
|
opt-level = 3
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[unstable]
|
|
||||||
build-std = ["std", "panic_abort"]
|
|
||||||
build-std-features = ["panic_immediate_abort"]
|
|
||||||
share-generics = true
|
|
|
@ -1,4 +1,2 @@
|
||||||
# trunk output
|
# trunk output
|
||||||
dist/
|
dist/
|
||||||
|
|
||||||
!Cargo.lock
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
[workspace]
|
|
||||||
members = [
|
|
||||||
"*",
|
|
||||||
]
|
|
||||||
exclude = [
|
|
||||||
"target",
|
|
||||||
".cargo"
|
|
||||||
]
|
|
||||||
resolver = "2"
|
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
lto = true
|
|
||||||
codegen-units = 1
|
|
||||||
panic = "abort"
|
|
||||||
opt-level = "z"
|
|
|
@ -1 +0,0 @@
|
||||||
!Cargo.lock
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,14 +0,0 @@
|
||||||
[workspace]
|
|
||||||
members = [
|
|
||||||
"*",
|
|
||||||
]
|
|
||||||
exclude = [
|
|
||||||
"target"
|
|
||||||
]
|
|
||||||
resolver = "2"
|
|
||||||
|
|
||||||
[profile.bench]
|
|
||||||
lto = true
|
|
||||||
codegen-units = 1
|
|
||||||
panic = "abort"
|
|
||||||
opt-level = 3
|
|
|
@ -14,10 +14,5 @@ wasm-bindgen = "0.2.83"
|
||||||
web-sys = { version = "0.3.60", features = ["Window"]}
|
web-sys = { version = "0.3.60", features = ["Window"]}
|
||||||
yew = { version = "0.20.0", features = ["csr"], path = "../../packages/yew" }
|
yew = { version = "0.20.0", features = ["csr"], path = "../../packages/yew" }
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
lto = true
|
|
||||||
codegen-units = 1
|
|
||||||
panic = "abort"
|
|
||||||
|
|
||||||
[package.metadata.wasm-pack.profile.release]
|
[package.metadata.wasm-pack.profile.release]
|
||||||
wasm-opt = ['-O4']
|
wasm-opt = ['-O4']
|
||||||
|
|
|
@ -14,10 +14,5 @@ wasm-bindgen = "0.2.83"
|
||||||
web-sys = { version = "0.3.60", features = ["Window"]}
|
web-sys = { version = "0.3.60", features = ["Window"]}
|
||||||
yew = { version = "0.20.0", features = ["csr"], path = "../../packages/yew" }
|
yew = { version = "0.20.0", features = ["csr"], path = "../../packages/yew" }
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
lto = true
|
|
||||||
codegen-units = 1
|
|
||||||
panic = "abort"
|
|
||||||
|
|
||||||
[package.metadata.wasm-pack.profile.release]
|
[package.metadata.wasm-pack.profile.release]
|
||||||
wasm-opt = ['-O4']
|
wasm-opt = ['-O4']
|
||||||
|
|
|
@ -4,6 +4,7 @@ version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
publish = false
|
publish = false
|
||||||
|
rust-version = "1.62"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
yew-agent = { path = "../../packages/yew-agent/" }
|
yew-agent = { path = "../../packages/yew-agent/" }
|
||||||
|
|
Loading…
Reference in New Issue