Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Actions #2998

Merged
merged 4 commits into from
Dec 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ updates:
schedule:
interval: "monthly"
target-branch: "master"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
target-branch: "master"
5 changes: 2 additions & 3 deletions .github/workflows/benchmark-ssr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/build-api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 2 additions & 4 deletions .github/workflows/inspect-next-changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
79 changes: 28 additions & 51 deletions .github/workflows/main-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -171,52 +158,42 @@ 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
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

- 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 changes: 4 additions & 4 deletions .github/workflows/publish-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/publish-yew-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/publish-yew-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/publish-yew-router-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/publish-yew-router.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/publish-yew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/size-cmp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading