-
Notifications
You must be signed in to change notification settings - Fork 9
70 lines (62 loc) · 1.76 KB
/
validate.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Validate
on:
push:
branches: [ main, main-beta, epic/* ]
pull_request:
branches: [ main, main-beta, epic/* ]
workflow_dispatch:
env:
node-version: 20.x
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node v${{ env.node-version }}
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: ${{ env.node-version }}
- name: Install NPM Dependencies
run: npm ci
- name: Run Linting JS
run: npm run lint:js
- name: Run Linting CSS
run: npm run lint:css
test:
name: Unit Tests & Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node v${{ env.node-version }}
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: ${{ env.node-version }}
- name: Install NPM Dependencies
run: npm ci
- name: Run Tests
run: npm run test:ci
- name: Collect and Publish coverage to Code Climate
uses: paambaati/[email protected]
continue-on-error: true
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_REPORTER_ID}}
with:
verifyDownload: false
coverageLocations: ${{github.workspace}}/.report/lcov.info:lcov
test-custom-eslint:
name: Custom ESLint Plugin Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node v${{ env.node-version }}
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: ${{ env.node-version }}
- name: Install NPM Dependencies
run: npm ci
- name: Run ESLint Plugin Tests
run: npm run test -w eslint-plugin