Repository navigation
Improve CI testing #3333
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
Merged
Merged
Improve CI testing #3333
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,9 @@ on: | |
| merge_group: | ||
| types: [checks_requested] | ||
|
|
||
| env: | ||
| RUSTFLAGS: -Dwarnings | ||
|
|
||
| jobs: | ||
| coverage: | ||
| name: Coverage | ||
|
|
@@ -38,7 +41,7 @@ jobs: | |
| uses: codecov/codecov-action@v3 | ||
|
|
||
| tests: | ||
| name: Build and Test | ||
| name: Test | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 60 | ||
| strategy: | ||
|
|
@@ -58,24 +61,16 @@ jobs: | |
| run: cargo test --no-run --profile ci | ||
| # this order is faster according to rust-analyzer | ||
| - name: Build | ||
| run: cargo build --all-targets --quiet --profile ci | ||
| run: cargo build --all-targets --quiet --profile ci --features annex-b,intl,experimental | ||
| - name: Install latest nextest | ||
| uses: taiki-e/install-action@nextest | ||
| - name: Test with nextest | ||
| run: cargo nextest run --profile ci --cargo-profile ci --features annex-b,intl,experimental | ||
| - name: Test docs | ||
| run: cargo test --doc --profile ci --features annex-b,intl,experimental | ||
| - name: Build boa_ast crate | ||
| run: cargo build -p boa_ast | ||
| - name: Build boa_cli crate | ||
| run: cargo build -p boa_cli | ||
| - name: Build boa_parser crate | ||
| run: cargo build -p boa_parser | ||
| - name: Build boa_runtime crate | ||
| run: cargo build -p boa_runtime | ||
|
|
||
| msrv: | ||
| name: Minimum supported Rust version | ||
| name: MSRV | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| steps: | ||
|
|
@@ -92,41 +87,113 @@ jobs: | |
| - name: Check compilation | ||
| run: cargo check --all-features --all-targets | ||
|
|
||
| misc: | ||
| name: Misc | ||
| fmt: | ||
| name: Formatting | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions-rs/[email protected] | ||
| with: | ||
| toolchain: stable | ||
| override: true | ||
| profile: minimal | ||
| components: rustfmt | ||
| - name: Format (rustfmt) | ||
| run: cargo fmt --all --check | ||
|
|
||
| clippy: | ||
| name: Lint | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions-rs/[email protected] | ||
| with: | ||
| toolchain: stable | ||
| override: true | ||
| profile: minimal | ||
| components: clippy | ||
| - name: Install cargo-workspaces | ||
| uses: actions-rs/[email protected] | ||
| with: | ||
| crate: cargo-workspaces | ||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| key: clippy | ||
| - name: Clippy (All features) | ||
| run: cargo workspaces exec cargo clippy --all-features --all-targets -- -D warnings | ||
| - name: Clippy (No features) | ||
| run: cargo workspaces exec cargo clippy --no-default-features --all-targets -- -D warnings | ||
|
|
||
| docs: | ||
| name: Documentation | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| env: | ||
| RUSTFLAGS: -D warnings | ||
| RUSTDOCFLAGS: -D warnings | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions-rs/[email protected] | ||
| with: | ||
| toolchain: stable | ||
| override: true | ||
| profile: minimal | ||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| key: docs | ||
| - name: Generate documentation | ||
| run: cargo doc -v --document-private-items --all-features | ||
|
|
||
| build-fuzz: | ||
| name: Fuzzing | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions-rs/[email protected] | ||
| with: | ||
| toolchain: stable | ||
| override: true | ||
| profile: minimal | ||
| components: rustfmt, clippy | ||
| - uses: actions-rs/[email protected] | ||
| - name: Install cargo-fuzz | ||
| uses: actions-rs/[email protected] | ||
| with: | ||
| crate: cargo-fuzz | ||
| version: latest | ||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| key: misc | ||
| - name: Format (rustfmt) | ||
| run: cargo fmt --all --check | ||
| - name: Lint (All features) | ||
| run: cargo clippy --all-features --all-targets | ||
| - name: Lint (No features) | ||
| run: cargo clippy -p boa_engine --no-default-features --all-targets | ||
| - name: Generate documentation | ||
| run: cargo doc -v --document-private-items --all-features | ||
| - name: Build | ||
| run: cargo build --all-targets --quiet --profile ci | ||
| - name: Build fuzzers | ||
| key: build-fuzz | ||
| - name: Build fuzz | ||
| run: cargo fuzz build -s none | ||
| - run: cd boa_examples | ||
| - name: Build examples | ||
| run: cargo build --quiet --profile ci | ||
| - name: Run example classes | ||
| run: cargo run --bin classes --profile ci | ||
|
|
||
| build-run-examples: | ||
| name: Build & run examples | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions-rs/[email protected] | ||
| with: | ||
| toolchain: stable | ||
| override: true | ||
| profile: minimal | ||
| - name: Install cargo-workspaces | ||
| uses: actions-rs/[email protected] | ||
| with: | ||
| crate: cargo-workspaces | ||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| key: build-run-examples | ||
|
|
||
| - name: Build (All features) | ||
| run: cargo workspaces exec cargo build --all-features --all-targets --profile ci | ||
| - name: Build (No features) | ||
| run: cargo workspaces exec cargo build --no-default-features --all-targets --profile ci | ||
|
|
||
| - name: Run examples | ||
| run: | | ||
| cd boa_examples | ||
| cargo run -p boa_examples --bin 2>&1 \ | ||
| | grep -E '^ ' \ | ||
| | xargs -n1 sh -c 'cargo run -p boa_examples --profile ci --bin $0 || exit 255' | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.