forked from aws-powertools/powertools-lambda-java
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (82 loc) · 2.88 KB
/
build.yml
File metadata and controls
83 lines (82 loc) · 2.88 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
name: Build
on:
pull_request:
branches:
- master
paths:
- 'powertools-cloudformation/**'
- 'powertools-core/**'
- 'powertools-serialization/**'
- 'powertools-logging/**'
- 'powertools-sqs/**'
- 'powertools-tracing/**'
- 'powertools-validation/**'
- 'powertools-idempotency/**'
- 'powertools-parameters/**'
- 'powertools-metrics/**'
- 'powertools-test-suite/**'
- 'examples/**'
- 'pom.xml'
- 'examples/pom.xml'
- '.github/workflows/**'
push:
branches:
- master
paths:
- 'powertools-cloudformation/**'
- 'powertools-core/**'
- 'powertools-serialization/**'
- 'powertools-logging/**'
- 'powertools-sqs/**'
- 'powertools-tracing/**'
- 'powertools-validation/**'
- 'powertools-idempotency/**'
- 'powertools-parameters/**'
- 'powertools-metrics/**'
- 'powertools-test-suite/**'
- 'examples/**'
- 'pom.xml'
- 'examples/pom.xml'
- '.github/workflows/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
# test against latest update of each major Java version, as well as specific updates of LTS versions:
java: [8, 8.0.192, 11.0.x, 11.0.3, 12, 13, 15, 16, 17 ]
name: Java ${{ matrix.java }}
env:
JAVA: ${{ matrix.java }}
AWS_REGION: eu-west-1
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Build with Maven
run: mvn -Pbuild-without-spotbugs -B package --file pom.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # 3.1.1
if: ${{ matrix.java == '11.0.x' }} # publish results once
with:
files: ./powertools-cloudformation/target/site/jacoco/jacoco.xml,./powertools-core/target/site/jacoco/jacoco.xml,./powertools-idempotency/target/site/jacoco/jacoco.xml,./powertools-logging/target/site/jacoco/jacoco.xml,./powertools-metrics/target/site/jacoco/jacoco.xml,./powertools-parameters/target/site/jacoco/jacoco.xml,./powertools-serialization/target/site/jacoco/jacoco.xml,./powertools-sqs/target/site/jacoco/jacoco.xml,./powertools-tracing/target/site/jacoco/jacoco.xml,./powertools-validation/target/site/jacoco/jacoco.xml
savepr:
runs-on: ubuntu-latest
name: Save PR number if running on PR by dependabot
if: github.actor == 'dependabot[bot]'
steps:
- name: Create Directory and save issue
run: |
mkdir -p ./pr
echo ${{ github.event.number }}
echo ${{ github.event.number }} > ./pr/NR
- uses: actions/upload-artifact@v2
name: Upload artifact
with:
name: pr
path: pr/