Introduce a Class
map
#9852
Workflow file for this run
This file contains 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
name: Continuous integration | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
merge_group: | |
types: [checks_requested] | |
jobs: | |
coverage: | |
name: Coverage | |
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-tarpaulin | |
uses: baptiste0928/[email protected] | |
with: | |
crate: cargo-tarpaulin | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: tarpaulin | |
- name: Run tarpaulin | |
uses: actions-rs/cargo@v1 | |
with: | |
command: tarpaulin | |
args: --workspace --features annex-b,intl,experimental --ignore-tests --engine llvm --out xml | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v3 | |
tests: | |
name: Build and Test | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
os: | |
- macos-latest | |
- windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/[email protected] | |
with: | |
toolchain: stable | |
override: true | |
profile: minimal | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build tests | |
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 | |
- 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 | |
msrv: | |
name: Minimum supported Rust version | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
# Get the rust_version from the Cargo.toml | |
- name: Get rust_version | |
id: rust_version | |
run: echo "rust_version=$(grep '^rust-version' Cargo.toml | cut -d' ' -f3 | tr -d '"')" >> $GITHUB_OUTPUT | |
- uses: actions-rs/[email protected] | |
with: | |
toolchain: ${{ steps.rust_version.outputs.rust_version }} | |
override: true | |
profile: minimal | |
- name: Check compilation | |
run: cargo check --all-features --all-targets | |
misc: | |
name: Misc | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
env: | |
RUSTFLAGS: -D warnings | |
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] | |
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 | |
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 |