-
Notifications
You must be signed in to change notification settings - Fork 5
86 lines (81 loc) · 2.19 KB
/
build.yml
File metadata and controls
86 lines (81 loc) · 2.19 KB
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
name: Build & Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Java ${{ matrix.java }} build
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 1.8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ]
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-package: jdk
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn -B package --file pom.xml
- run: mkdir artifacts && cp target/*.jar artifacts
- name: Upload Maven build artifact
uses: actions/upload-artifact@v2
with:
name: artifact-java-${{ matrix.java }}.jar
path: artifacts
test:
name: Java ${{ matrix.java }} test
needs: [build]
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 1.8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ]
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Run tests with Maven
run: mvn -B test --file pom.xml
codeql:
name: CodeQL Analyze
needs: [ build ]
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'java' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
# lint:
# name: Linter
# needs: [ build ]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout source code
# uses: actions/checkout@v2
# - name: Lint Codebase
# uses: github/super-linter/slim@v4
# env:
# VALIDATE_ALL_CODEBASE: false
# DEFAULT_BRANCH: main
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}