-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (39 loc) · 1.13 KB
/
multi-platform-ci.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
name: multi-platform-ci
on:
push:
branches-ignore:
- main
- wip*
jobs:
ci:
name: run tests, style verification, measure code coverage and publish to nexus staging repository
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, windows-2019 ]
env:
OS: ${{ matrix.os }}
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Java JDK 11 setup
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Run tests via gradle
run: ./gradlew clean build test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
env_vars: OS
fail_ci_if_error: true
verbose: true
# Publish to the staging repository only once, from the Linux Runner
- name: Publish to Staging repository
if: runner.os == 'Linux'
run: ./gradlew publishToSonatype
env:
NEXUS_TARGET: SNAPSHOT
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}