generated from wuespace/telestion-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 1.74 KB
/
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
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# ******** NOTE ********
# If you need access to the GitHub Maven package registry from other repositories,
# create a personal access token with the following scopes:
# - read:packages
# and name it "READ_PACKAGES".
# After this step, overwrite the default GITHUB_TOKEN environment variable with the created PAT
# in the gradle build and test steps.
name: CI
# Events that trigger this workflow
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout 📥
uses: actions/checkout@v3.3.0
- name: Set up JDK 16 💿
uses: actions/setup-java@v3.9.0
with:
distribution: 'zulu'
java-version: '16'
java-package: jdk
cache: 'gradle'
- name: Build packages 🛠️
run: chmod +x gradlew && ./gradlew build
env:
GITHUB_TOKEN: ${{ secrets.READ_PACKAGES }}
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout 📥
uses: actions/checkout@v3.3.0
- name: Set up JDK 16 💿
uses: actions/setup-java@v3.9.0
with:
distribution: 'zulu'
java-version: '16'
java-package: jdk
cache: 'gradle'
- name: Test packages 🛃
run: chmod +x gradlew && ./gradlew test
env:
GITHUB_TOKEN: ${{ secrets.READ_PACKAGES }}
- name: Upload Test Report 📠
if: ${{ github.actor != 'dependabot[bot]' }}
uses: scacap/action-surefire-report@v1.3.0
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}