feat: Cache debug artifacts #2390
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: Formatting | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- master | |
# This will cancel previous runs when a branch or PR is updated | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
clippy: | |
name: cargo clippy | |
runs-on: ${{ matrix.runner }} | |
timeout-minutes: 30 | |
env: | |
RUSTFLAGS: -Dwarnings | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- runner: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup toolchain | |
uses: dtolnay/rust-toolchain@1.66.0 | |
with: | |
targets: ${{ matrix.target }} | |
components: clippy, rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.target }} | |
cache-on-failure: true | |
save-if: ${{ github.event_name != 'merge_group' }} | |
- name: Run `cargo clippy` | |
run: cargo clippy --workspace --locked --release | |
- name: Run `cargo fmt` | |
run: cargo fmt --all --check | |
eslint: | |
name: eslint | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Yarn dependencies | |
uses: ./.github/actions/setup | |
- name: Run `yarn lint` | |
run: yarn lint |