mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-30 07:22:11 +00:00
293b6185b9
## Description: Updated #935 with token. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors --------- Co-authored-by: aqw42 <garsvog1@gmail.com> Co-authored-by: Théodore Léon <corentin.noel56@gmail.com> Co-authored-by: evanpelle <evanpelle@gmail.com> Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
76 lines
1.8 KiB
YAML
76 lines
1.8 KiB
YAML
name: 🧪 CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
build:
|
|
name: 🏗️ Build
|
|
runs-on: ubuntu-latest
|
|
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
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: false
|
|
- name: Setup node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- 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 }}
|
|
- run: npm ci
|
|
- name: Test coverage
|
|
uses: ArtiomTr/jest-coverage-report-action@262a7bb0b20c4d1d6b6b026af0f008f78da72788
|
|
with:
|
|
github-token: ${{ github.repository == 'openfrontio/OpenFrontIO' && steps.generate-token.outputs.token || env.GITHUB_TOKEN }}
|
|
|
|
eslint:
|
|
name: 🔍 ESLint
|
|
runs-on: ubuntu-latest
|
|
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
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: "npm"
|
|
- run: npm ci
|
|
- run: npx prettier --check .
|