Skip to content

New translations dashboard.json (English, United States) #42

New translations dashboard.json (English, United States)

New translations dashboard.json (English, United States) #42

Workflow file for this run

name: Format & Lint
on:
push:
branches:
- "**"
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: "rust-deps"
cache-on-failure: true
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 10
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: "2.3.3"
- name: Run rustfmt
run: cargo fmt --all
- name: Run Biome format
run: biome format --write
- name: Commit & Push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: auto format by rustfmt & biome"
push_options: "--force-with-lease"
lint:
runs-on: ubuntu-latest
needs: format
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: "rust-deps"
cache-on-failure: true
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 10
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Setup Biome
uses: biomejs/setup-biome@v2
- name: Cache cargo binaries
uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-bins-${{ hashFiles('**/Cargo.lock') }}
- name: Setup sqlx cli
run: |
if ! command -v sqlx &> /dev/null; then
cargo install sqlx-cli --no-default-features --features sqlite-unbundled
fi
- name: Run cargo check
env:
DATABASE_URL: "sqlite:./data.db"
run: |
sqlx database setup
cargo check --all --all-targets
# biome check will throw error if there are any formatting issues
- name: Run Biome format
run: biome format --write
- name: Run Biome lint
run: biome ci