Skip to content

Evaluate all parts of class in strict mode (#3383) #10085

Evaluate all parts of class in strict mode (#3383)

Evaluate all parts of class in strict mode (#3383) #10085

Workflow file for this run

name: Continuous integration
on:
pull_request:
branches:
- main
push:
branches:
- main
merge_group:
types: [checks_requested]
env:
RUSTFLAGS: -Dwarnings
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: 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 --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
msrv:
name: MSRV
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
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:
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
- name: Install cargo-fuzz
uses: actions-rs/[email protected]
with:
crate: cargo-fuzz
version: latest
- uses: Swatinem/rust-cache@v2
with:
key: build-fuzz
- name: Build fuzz
run: cargo fuzz build -s none
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'