-
Notifications
You must be signed in to change notification settings - Fork 993
60 lines (56 loc) · 1.59 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
52
53
54
55
56
57
58
59
60
name: JavaScript
on:
pull_request:
paths:
- 'webpack/**'
- 'package.json'
- '.github/workflows/js_tests.yml'
- '.eslintrc'
- '.eslintignore'
permissions:
contents: read
concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
setup_matrix:
name: Setup matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.build_matrix.outputs.matrix }}
steps:
- name: Build test matrix
id: build_matrix
uses: theforeman/gha-matrix-builder@v0
test:
permissions:
checks: write # for coverallsapp/github-action to create new checks
contents: read # for actions/checkout to fetch code
runs-on: ubuntu-latest
needs: setup_matrix
timeout-minutes: 20
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.setup_matrix.outputs.matrix) }}
steps:
- name: Checkout Foreman
uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Setup Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- 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 tests
run: npm run test
- name: Publish Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}