Files
Scott Anderson 5c8f85fc5f permissions
2025-08-27 18:44:24 -04:00

89 lines
2.2 KiB
YAML

name: 🧪 CI
on:
merge_group:
types:
- checks_requested
pull_request:
push:
branches: [main]
permissions: {}
jobs:
build:
name: 🏗️ Build
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: false
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run build-prod
- uses: actions/upload-artifact@v4
with:
path: out/index.html
retention-days: 1
test:
name: 🔬 Test
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
checks: write
pull-requests: write
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: false
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- uses: actions/create-github-app-token@v2
id: generate-token
if: ${{ github.repository == 'openfrontio/OpenFrontIO' }}
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: ArtiomTr/jest-coverage-report-action@262a7bb0b20c4d1d6b6b026af0f008f78da72788
if: ${{ github.repository != 'openfrontio/OpenFrontIO' }}
- uses: ArtiomTr/jest-coverage-report-action@262a7bb0b20c4d1d6b6b026af0f008f78da72788
if: ${{ github.repository == 'openfrontio/OpenFrontIO' }}
with:
github-token: ${{ steps.generate-token.outputs.token }}
eslint:
name: 🔍 ESLint
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- run: npm ci
- run: npx eslint --format gha
prettier:
name: 🎨 Prettier
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- run: npm ci
- run: npx prettier --check .