-
Notifications
You must be signed in to change notification settings - Fork 307
63 lines (60 loc) · 1.8 KB
/
gradle.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
name: Build and Test
on:
push:
branches:
- master
pull_request:
branches:
- master
- BRANCH*
jobs:
build:
permissions:
checks: write
pull-requests: write
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_HOST_AUTH_METHOD: trust
# Set health checks to wait until postgres has started
options: >-
--name postgres
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- name: Checkout submodules
shell: bash
run: |
git submodule sync --recursive
git submodule update --init --force --recursive --depth=1
- uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: 21.0.2
java-package: jdk+fx
cache: 'gradle'
- name: Build GanttProject
run: ./gradlew --no-daemon build
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
**/test-results/**/*.xml
**/test-results/**/*.trx
**/test-results/**/*.json
- name: Publish libs
run: ./gradlew --no-daemon publishToMavenLocal
- name: Initialize PostgreSQL
run: |
cd cloud.ganttproject.colloboque/src/main/resources
docker run --rm --network ${{ job.container.network }} --link postgres:postgres -v $(pwd):/src -w /src postgres psql -h postgres -U postgres -f ./init-colloboque-server.sql
- name: Build Colloboque
run: cd cloud.ganttproject.colloboque && ./gradlew --no-daemon build