-
Notifications
You must be signed in to change notification settings - Fork 48
87 lines (72 loc) · 2.22 KB
/
pr-gate-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
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
name: Pull Request Gate CI
on: pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
java_version: [17]
os: [windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java_version }}
- name: Build with Gradle
run: ./gradlew build javadoc asciidoc
matrix-test:
name: Test on java ${{ matrix.java_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
java_version: [17]
os: [windows-latest] # , macOS-latest (remove macOS as it is not stable for now)
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java_version }}
- name: Build with Gradle
run: ./gradlew check
code-analysis:
name: Code Analysis
runs-on: ${{ matrix.os }}
strategy:
matrix:
java_version: [17]
os: [windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java_version }}
- name: Build with Gradle
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: if not "${{ secrets.SONAR_TOKEN }}" == "" gradlew jacocoTestReport sonar check javadoc asciidoc -Dsonar.organization=webauthn4j -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=${{ secrets.SONAR_TOKEN }}
shell: cmd
auto-merge:
name: Auto Merge
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
permissions:
contents: write
pull-requests: write
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Merge
run: gh pr merge "${GITHUB_HEAD_REF}" --merge --auto