generated from IliyanKostov9/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (87 loc) · 2.35 KB
/
test.yaml
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
94
95
96
97
98
99
name: Test
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- master
paths:
- "**"
- "!.gitignore"
- "!README.md"
jobs:
checkout:
name: Checkout repo
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Save repo to artifact
uses: actions/upload-artifact@v4
with:
name: phd-portal-server
path: .
overwrite: true
if-no-files-found: error
include-hidden-files: true
retention-days: 0
test:
name: Test
runs-on: ubuntu-latest
needs: checkout
if: ${{ github.actor != 'dependabot[bot]' }}
strategy:
fail-fast: false
matrix:
java_version: [21]
steps:
- name: Download repo artifact
uses: actions/download-artifact@v4
with:
name: phd-portal-server
path: .
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java_version }}
distribution: "zulu"
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Test
run: ./gradlew test
# lint:
# name: Lint
# runs-on: ubuntu-latest
# if: ${{ github.actor != 'dependabot[bot]' }}
# needs: test
# strategy:
# fail-fast: false
# matrix:
# java_version: [21]
#
# steps:
# - name: Download repo artifact
# uses: actions/download-artifact@v4
# with:
# name: phd-portal-server
# path: .
#
# - name: Set up JDK ${{ matrix.java_version }}
# uses: actions/setup-java@v4
# with:
# java-version: ${{ matrix.java_version }}
# distribution: "zulu"
# - name: Run checkstyle
# uses: dbelyaev/action-checkstyle@master
# with:
# github_token: ${{ secrets.github_token }}
# reporter: github-check
# level: failure # warning
# # NOTE: set to true to fail action
# fail_on_error: false
# checkstyle_version: "10.20.0"
# workdir: .
# properties_file: ./src/main/resources/application.properties
# checkstyle_config: checkstyle.xml