Support PowerShell #142
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: Build (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macOS-latest | |
- ubuntu-latest | |
- windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Fetch Test Branches | |
run: git fetch origin test/javascript:test/javascript | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Check | |
run: cargo check | |
- name: Build | |
run: cargo build --verbose | |
- name: Test | |
run: cargo test --verbose | |
- name: Install tarpaulin | |
uses: actions-rs/[email protected] | |
# NOTE: The last step fails if tarpaulin is already installed | |
continue-on-error: true | |
with: | |
crate: cargo-tarpaulin | |
- name: Generate Coverage | |
run: cargo tarpaulin --verbose --workspace --timeout 120 --out Xml | |
- name: Upload Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
flags: ${{ matrix.os }} | |
token: ${{ secrets.CODECOV_TOKEN }} | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check Format | |
run: cargo fmt -- --check | |
- name: Lint | |
run: cargo clippy -- -D warnings | |
check-languages-file: | |
name: Check Languages File | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0' | |
- name: Check Languages File | |
run: ruby ./scripts/check-languages-file.rb | |
benchmarks: | |
name: Benchmarks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 3 | |
- name: Run Benchmarks | |
run: cargo bench |