-
-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (43 loc) · 1.58 KB
/
ci-lint-prettier.yml
File metadata and controls
48 lines (43 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# This workflow will do a clean install of node dependencies, and then check lint and prettier formatting.
# See: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Lint and Prettier
permissions: {}
on:
push:
branches: [master, develop, sf-qa, sf-live]
pull_request:
merge_group:
jobs:
test:
name: Lint and Prettier
runs-on: ubuntu-latest
strategy:
matrix:
node_version: ["22.13.0"]
npm_version: ["10.9.2"]
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node_version }}
cache: "npm"
cache-dependency-path: |
src/SIL.XForge.Scripture/ClientApp/package-lock.json
src/RealtimeServer/package-lock.json
- name: Upgrade npm
env:
NPM_VERSION: ${{ matrix.npm_version }}
run: |
set -xueo pipefail
npm install -g npm@${NPM_VERSION}
- name: Realtime Server Lint check
run: cd src/RealtimeServer && (npm ci || (sleep 3m && npm ci)) && npm run lint
- name: Realtime Server Prettier format check
run: cd src/RealtimeServer && npm run prettier:ci
- name: Angular Frontend Lint check
run: cd src/SIL.XForge.Scripture/ClientApp && (npm ci || (sleep 3m && npm ci)) && npm run lint
- name: Angular Frontend Prettier format check
run: cd src/SIL.XForge.Scripture/ClientApp && npm run prettier:ci