Skip to content

docs(cli): update --verbose doc (#3801) #31

docs(cli): update --verbose doc (#3801)

docs(cli): update --verbose doc (#3801) #31

Workflow file for this run

# This workflow run when something is pushed on main and it does:
# - normal checks like in the normal PRs
# - expand the test suite to be run on multiple OS
# - runs the coverage and prints in the command line
name: CI on main
on:
workflow_dispatch:
push:
branches:
- main
env:
RUST_LOG: info
RUST_BACKTRACE: 1
RUSTUP_WINDOWS_PATH_ADD_BIN: 1
jobs:
format:
name: Format Rust Files
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Support longpaths
run: git config core.longpaths true
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Free Disk Space
uses: ./.github/actions/free-disk-space
- name: Install toolchain
uses: moonrepo/setup-rust@e013866c4215f77c925f42f60257dec7dd18836e # v1.2.1
with:
components: rustfmt
bins: taplo-cli
cache-base: main
- name: Run rustfmt
run: |
cargo fmt --all --verbose -- --check
taplo format --check
lint:
name: Lint Rust Files
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Free Disk Space
uses: ./.github/actions/free-disk-space
- name: Install toolchain
uses: moonrepo/setup-rust@e013866c4215f77c925f42f60257dec7dd18836e # v1.2.1
with:
components: clippy
cache-base: main
- name: Run cargo check
run: cargo check --workspace --all-targets --release
- name: Run clippy
run: cargo lint
check-dependencies:
name: Check Dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Free Disk Space
uses: ./.github/actions/free-disk-space
- name: Install toolchain
uses: moonrepo/setup-rust@e013866c4215f77c925f42f60257dec7dd18836e # v1.2.1
with:
channel: nightly
cache: false
- name: Install udeps
run: cargo install cargo-udeps --locked
- name: Run udeps
run: cargo +nightly udeps --all-targets
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
- os: ubuntu-latest
- os: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Free Disk Space
uses: ./.github/actions/free-disk-space
- name: Install toolchain
uses: moonrepo/setup-rust@e013866c4215f77c925f42f60257dec7dd18836e # v1.2.1
with:
cache-base: main
- name: Run tests on ${{ matrix.os }}
run: cargo test --workspace
coverage:
name: Test262 Coverage
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ windows-latest, ubuntu-latest ]
steps:
# ref: https://github.com/orgs/community/discussions/26952
- name: Support longpaths
if: matrix.os == 'windows-latest'
run: git config --system core.longpaths true
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: recursive
- name: Free Disk Space
uses: ./.github/actions/free-disk-space
- name: Install toolchain
uses: moonrepo/setup-rust@e013866c4215f77c925f42f60257dec7dd18836e # v1.2.1
with:
cache-target: release
cache-base: main
- name: Compile
run: cargo build --release --locked -p xtask_coverage
- name: Run Test262 suite
continue-on-error: true
run: cargo coverage
- name: Clean cache
run: cargo cache --autoclean