forked from ArcadeData/arcadedb
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (79 loc) · 2.63 KB
/
mvn-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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Java CI - test
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
continue-on-error: [ false ]
include:
- os: windows-latest
continue-on-error: true
runs-on: ${{ matrix.os }}
steps:
- uses: xembly/workflow-manager@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
run: clean, cancel
verbose: false
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
- name: Set up QEMU
if: ${{ matrix.os != 'windows-latest' }}
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
if: ${{ matrix.os != 'windows-latest' }}
uses: docker/setup-buildx-action@v3
- name: Set up GraalVM 11
uses: graalvm/setup-graalvm@v1
with:
version: '22.3.2'
gds-token: ${{ secrets.GDS_TOKEN }}
java-version: '11'
cache: 'maven'
components: 'native-image,js'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install jars
continue-on-error: ${{ matrix.continue-on-error }}
run: mvn --show-version clean install -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test
continue-on-error: ${{ matrix.continue-on-error }}
run: mvn verify -Pintegration -Pcoverage -Pdocker --batch-mode --errors --fail-at-end --show-version -pl !e2e
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: E2E Test
if: ${{ success() && matrix.os != 'windows-latest' }}
run: mvn verify -pl e2e
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test Reporter
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Test Report - ${{ matrix.os }}
path: '**/surefire-reports/TEST*.xml'
list-suites: 'failed'
list-tests: 'failed'
reporter: java-junit
- name: Get coverage files
if: ${{ matrix.os != 'windows-latest' }}
id: coverage-files-generator
run: |
echo ::set-output name=COVERAGE_FILES::$(find **/jacoco*.xml -printf '%p,')
- name: Codacy coverage reporter
if: ${{ matrix.os != 'windows-latest' }}
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ${{ steps.coverage-files-generator.COVERAGE_FILES }}