This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (79 loc) · 2.51 KB
/
pr.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Pull Request
on:
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build-api-editor:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./api-editor
strategy:
matrix:
node-version: [ 18.x ]
java-version: [ 17 ]
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: api-editor/gui/package-lock.json
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
cache: gradle
# See https://docs.github.com/en/actions/guides/building-and-testing-java-with-gradle
- name: Setup Gradle
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
run: ./gradlew build koverMergedXmlReport
- name: Upload test report
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: backend test report
path: api-editor/backend/build/reports
if-no-files-found: ignore
- name: Upload coverage to Codecov
if: ${{ github.actor != 'dependabot[bot]' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: api-editor/build/reports/kover/merged/xml
files: report.xml
gui-test-coverage:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./api-editor/gui
strategy:
matrix:
node-version: [ 18.x ]
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: api-editor/gui/package-lock.json
- name: Install dependencies
run: npm ci
- name: Test with Vitest
run: npm run test-with-coverage
- name: Upload coverage to Codecov
if: ${{ github.actor != 'dependabot[bot]' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: api-editor/gui/coverage
files: coverage-final.json