-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (68 loc) · 2.07 KB
/
build.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
---
name: build
# Actions that take place on branches, pull-requests and on a schedule.
# Here we test the code and build container images but don't push them
# and therefore do not require docker credentials.
# -----------------
# Control variables (GitHub Secrets)
# -----------------
#
# At the GitHub 'organisation' or 'project' level you must have the following
# GitHub 'Repository Secrets' defined (i.e. via 'Settings -> Secrets'): -
#
# ORG_GRADLE_PROJECT_CXNMAVENPASSWORD
# ORG_GRADLE_PROJECT_CXNMAVENREPOSITORYURL
# ORG_GRADLE_PROJECT_CXNMAVENUSER
#
# SQUONK_DECRYPTION_KEY
#
# -----------
# Environment (GitHub Environments)
# -----------
#
# Environment (none)
on:
push:
branches-ignore:
- 'master'
pull_request:
branches:
- 'master'
schedule:
# Build every Monday at 7:15pm
- cron: '15 19 * * 1'
env:
ORG_GRADLE_PROJECT_cxnMavenPassword: ${{ secrets.ORG_GRADLE_PROJECT_CXNMAVENPASSWORD }}
ORG_GRADLE_PROJECT_cxnMavenRepositoryUrl: ${{ secrets.ORG_GRADLE_PROJECT_CXNMAVENREPOSITORYURL }}
ORG_GRADLE_PROJECT_cxnMavenUser: ${{ secrets.ORG_GRADLE_PROJECT_CXNMAVENUSER }}
SQUONK_DECRYPTION_KEY: ${{ secrets.SQUONK_DECRYPTION_KEY }}
SQUONK_IMAGE_TAG: latest
jobs:
test-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Java 8
uses: actions/setup-java@v1
with:
java-version: 8
- name: Write work-dir to env-file
run: echo SQUONK_DOCKER_WORK_DIR=$(echo ${{ github.workspace }}/tmp) >> $GITHUB_ENV
- name: Cache gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Install licenses
run: |
./gradlew installChemaxonLicenseToHome
./gradlew installChemaxonLibrary
working-directory: components
- name: Test
run: ./gradlew build
working-directory: components
- name: Build
run: ./gradlew dockerBuildImages -x test
working-directory: components