-
Notifications
You must be signed in to change notification settings - Fork 189
68 lines (59 loc) · 2.47 KB
/
pr-validation.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
name: PR Build Validation
on:
pull_request
jobs:
Build-Java:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v2
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
# We use Corretto Java 11 for Lambda: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
# Currently amazon-corretto Java is not supported for GitHub actions on Ubuntu-latest. By default we're using Adopt JDK11
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
# We may want to either switch to using an AL2 container (to give us corretto) or contribute a new JDK to the GitHub runners
# There is an open issue (as of 2021/06/30) requesting Corretto support: https://github.com/actions/setup-java/issues/68
# - name: Set up JDK 11
# uses: actions/setup-java@v2
# with:
# java-version: '11'
# distribution: 'adopt'
- name: Maven Compile, Test, Install
run: mvn install -Dcheckstyle.skip -Dspotbugs.skip
- name: Spotbugs Check
run: mvn spotbugs:check
- name: Code Style Check
run: mvn checkstyle:check
Build-WebClient:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# CI=false is required because GitHub hosted runners set CI=true, which causes Warnings to be treated as Errors when doing yarn build
# this is a workaround to allow the build to succeed until we can get around to fixing the warnings generated
# https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables
# TODO remove CI=false
- name: Build WebClient
run: |
cd ${{ github.workspace }}/client/web
yarn
CI=false yarn build