-
-
Notifications
You must be signed in to change notification settings - Fork 64
75 lines (70 loc) · 1.99 KB
/
test.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
71
72
73
74
75
name: Test
on: [push, pull_request]
permissions: read-all
concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
node_version: ['18']
java_version: ['11', '17','21']
java_distrib: [temurin]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- node_version: '18'
java_version: '17'
java_distrib: adopt
os: ubuntu-latest
name: Test
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- name: Install Java
uses: actions/setup-java@v3
with:
distribution: ${{ matrix.java_distrib }}
java-version: ${{ matrix.java_version }}
- name: Install dependencies and link
run: npm ci && npm link
- name: Run tests
env:
DEBUG: "npm-groovy-lint"
run: npm run test
coverage:
name: Test - No Java - CodeCov
strategy:
matrix:
debian_version: [bookworm]
node_version: ['18']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
container:
image: "node:${{ matrix.node_version }}-${{ matrix.debian_version }}"
timeout-minutes: 15
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install dependencies and link
run: npm ci && npm link
- name: Run tests
env:
DEBUG: "npm-groovy-lint"
run: npm run test:coverage
- name: Build coverage report
run: ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
file: coverage.lcov
flags: unittests
verbose: true
dry_run: true