forked from quarkusio/code.quarkus.io
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (74 loc) · 2.33 KB
/
ci-actions.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
69
70
71
72
73
74
75
76
77
name: Code Quarkus CI
on:
push:
paths-ignore:
- 'README.md'
- 'LICENSE.txt'
- 'build_deploy.sh'
- 'Makefile'
- '.github/ISSUE_TEMPLATE/**'
- '.github/stale.yml'
- '.dependabot/**'
- 'openshift/**'
pull_request:
types: [assigned, opened, synchronize, reopened, ready_for_review, edited]
paths-ignore:
- 'README.md'
- 'LICENSE.txt'
- 'build_deploy.sh'
- 'Makefile'
- '.github/ISSUE_TEMPLATE/**'
- '.github/stale.yml'
- '.dependabot/**'
- 'openshift/**'
env:
# Workaround testsuite locale issue
LANG: en_US.UTF-8
jobs:
build-test:
name: "Build & Test"
runs-on: ubuntu-latest
# Skip draft PRs and those with WIP in the subject, rerun as soon as its removed
if: "github.event_name != 'pull_request' || ( \
github.event.pull_request.draft == false && \
github.event.pull_request.state != 'closed' && \
contains(github.event.pull_request.title, 'wip ') == false && \
contains(github.event.pull_request.title, '[wip]') == false && \
(
github.event.action != 'edited' || \
contains(github.event.changes.title.from, 'wip ') || \
contains(github.event.changes.title.from, '[wip]') \
) \
)"
steps:
- uses: actions/checkout@v2
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK 11
# Uses sha for added security since tags can be updated
uses: joschi/setup-jdk@b9cc6eabf7e7e3889766b5cee486f874c9e1bd2d
with:
java-version: openjdk11
- name: Cache Maven Repository
id: cache-maven
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Yarn Packages
id: yarn-cache
uses: actions/cache@v1
with:
path: /.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('src/main/frontend/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Build
run: |
./mvnw -e -B -DskipTests=true clean install
- name: Test
run: |
./mvnw -e -B test