-
-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (48 loc) · 1.77 KB
/
testing.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
name: testing
on:
pull_request:
push:
branches: master
jobs:
mvn:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java-version: [8]
kiwitcms-url: [tcms.kiwitcms.org, public.tenant.kiwitcms.org]
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Java ${{ matrix.java-version }}
uses: actions/setup-java@v2
with:
# This is Eclipse Temurin 8 (based on OpenJDK), see https://adoptium.net/
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
- name: Prepare ~/.tcms.conf for ${{ matrix.kiwitcms-url }}
run: |
echo "[tcms]" > ~/.tcms.conf
echo "url = https://${{ matrix.kiwitcms-url }}/xml-rpc/" >> ~/.tcms.conf
echo "username = kiwitcms-bot" >> ~/.tcms.conf
echo "password = ${{ secrets.TCMS_PASSWORD }}" >> ~/.tcms.conf
- name: Disable submission to ${{ matrix.kiwitcms-url }} if no permissions
if: ${{ env.TCMS_PASSWORD == '' }}
run: |
sed -i "s/junit.jupiter.extensions.autodetection.enabled=true/junit.jupiter.extensions.autodetection.enabled=false/" pom.xml
env:
TCMS_PASSWORD: ${{ secrets.TCMS_PASSWORD }}
- name: Execute tests
run: |
export TCMS_PRODUCT=$GITHUB_REPOSITORY
# branch name or pull/123
export TCMS_PRODUCT_VERSION=$(echo $GITHUB_REF | sed "s|refs/heads/||" | sed "s|refs/||" | sed "s|/merge||")
# short commit number
export TCMS_BUILD=$(echo $GITHUB_SHA | cut -c1-7)
mvn checkstyle:checkstyle
mvn test -B jacoco:report
- name: Submit coverage report to codecov.io
uses: codecov/codecov-action@v2
with:
files: ./target/site/jacoco/jacoco.xml
verbose: true