feat: update & cleanup shared eslint/ts/prettier configurations #3151
Workflow file for this run
This file contains hidden or 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: | |
types: [opened, synchronize] | |
merge_group: | |
types: [checks_requested] | |
jobs: | |
build: | |
name: Lint and Test | |
runs-on: ubuntu-22.04 | |
env: | |
# Ensure pnpm output is colored in GitHub Actions logs | |
FORCE_COLOR: 3 | |
# Make cargo nextest successfully ignore projects without tests | |
NEXTEST_NO_TESTS: pass | |
steps: | |
- name: 📥 Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: 🧰 Install build dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -yq libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev | |
- name: 🧰 Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: 🧰 Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: 🧰 Setup Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
rustflags: '' | |
components: clippy, rustfmt | |
cache: false | |
- name: 🧰 Setup nextest | |
uses: taiki-e/install-action@nextest | |
# cargo-binstall does not have pre-built binaries for sqlx-cli, so we fall | |
# back to a cached cargo install | |
- name: 🧰 Setup cargo-sqlx | |
uses: taiki-e/cache-cargo-install-action@v2 | |
with: | |
tool: sqlx-cli | |
locked: false | |
no-default-features: true | |
features: rustls,postgres | |
- name: 💨 Setup Turbo cache | |
uses: rharkor/[email protected] | |
- name: 🧰 Install dependencies | |
run: pnpm install | |
- name: ⚙️ Start services | |
run: docker compose up --wait | |
- name: ⚙️ Setup Labrinth environment and database | |
working-directory: apps/labrinth | |
run: | | |
cp .env.local .env | |
sqlx database setup | |
- name: ⚙️ Set app environment | |
working-directory: packages/app-lib | |
run: cp .env.staging .env | |
- name: 🔍 Lint and test | |
run: pnpm run ci | |
- name: 🔍 Verify intl:extract has been run | |
run: | | |
pnpm intl:extract | |
git diff --exit-code --color */*/src/locales/en-US/index.json |