-
Notifications
You must be signed in to change notification settings - Fork 993
51 lines (49 loc) · 1.37 KB
/
js_tests.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
name: JavaScript
on:
pull_request:
paths:
- 'webpack/**'
- 'package.json'
- '.github/workflows/js_tests.yml'
- '.eslintrc'
- '.eslintignore'
permissions:
contents: read
jobs:
test:
permissions:
checks: write # for coverallsapp/github-action to create new checks
contents: read # for actions/checkout to fetch code
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
node-version:
- 12
- 14
steps:
- name: Checkout Foreman
uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Generate npm dependencies package-lock
run: npm install --package-lock-only --no-audit
- name: Install npm dependencies
run: npm ci --no-audit
- name: Run linter
run: npm run lint
- name: Run custom eslint rules Spellcheck (only warnings) and missing ouia-ids
run: npm run lint:custom
- name: Run tests
run: npm run test
- name: Publish Coveralls (node v14)
if: ${{ matrix.node-version == 14 }}
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}