feat: bump swc_core (#212) #37
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: plugin-test | |
on: | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- "**" | |
pull_request: | |
paths: # Only run when changes are made to rust code or root Cargo | |
- "./packages/**" | |
- "rust-toolchain" | |
- "rustfmt.toml" | |
- "clippy.toml" | |
# cancel previous job runs for the same workflow + pr | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
format-test: | |
name: format, spell check, test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
if: ${{ !matrix.settings.docker }} | |
with: | |
node-version: 16 | |
- name: Setup node dependencies | |
run: | | |
corepack enable | |
pnpm install | |
- name: Install toolchain | |
run: | | |
rustup show | |
rustup component add rustfmt | |
rustup component add clippy | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: check | |
- name: Run fmt and clippy | |
run: | | |
cd packages | |
cargo fmt --all -- --check | |
cargo clippy --workspace --all-targets -- -D warnings | |
- name: Run check | |
run: | | |
cd packages | |
cargo check --workspace --all-targets --release --locked | |
- name: Run test | |
run: | | |
cd packages | |
node -e "console.log(process.arch)" | |
cargo test --workspace |