Skip to content

Commit

Permalink
ci(project): add dashboard checks
Browse files Browse the repository at this point in the history
  • Loading branch information
klevente committed Jul 24, 2024
1 parent f5c2b9b commit daaea65
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
with:
node-version: 20.x
cache: "npm"
cache-dependency-path: '**/package-lock.json'

- name: Install deps
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml → .github/workflows/ci-bot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: CI (Bot)

on:
push:
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/ci-dashboard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: CI (Dashboard)

on:
push:
branches: [ main ]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
typecheck:
name: Typecheck
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./bot

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
cache-dependency-path: '**/package-lock.json'

- name: Install deps
run: npm ci

- name: Run tsc
run: npm run typecheck

prettier:
name: Prettier
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./bot

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
cache-dependency-path: '**/package-lock.json'

- name: Install deps
run: npm ci

- name: Run Prettier
run: npm run prettier:check

eslint:
name: ESLint
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./bot

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
cache-dependency-path: '**/package-lock.json'

- name: Install deps
run: npm ci

- name: Run ESLint
run: npm run lint

- name: Save ESLint Report
# npm script for ESLint
# eslint --output-file eslint_report.json --format json src
# See https://eslint.org/docs/user-guide/command-line-interface#options
run: npm run lint:report
# Continue to the next step even if this fails
continue-on-error: true

- name: Annotate Code Linting Results
uses: ataylorme/eslint-annotate-action@v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
report-json: "eslint_report.json"
1 change: 1 addition & 0 deletions dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "remix vite:build",
"dev": "remix vite:dev --host",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"lint:report": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint --output-file eslint_report.json --format json .",
"typecheck": "tsc",
"prettier:check": "prettier -c .",
"start": "remix-serve ./build/server/index.js"
Expand Down

0 comments on commit daaea65

Please sign in to comment.