-
Notifications
You must be signed in to change notification settings - Fork 4
95 lines (79 loc) · 3.01 KB
/
gretl.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: gretl
on:
workflow_dispatch:
push:
paths-ignore:
- 'docs/**'
- 'openshift/**'
- '**.md'
jobs:
build:
runs-on: ubuntu-22.04
env:
BUILD_NUMBER: ${{ github.run_number }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: 'gradle'
- name: Build with Gradle
run: ./gradlew clean gretl:classes
- name: Unit tests and publish plugin to local maven repo
run: |
TZ="Europe/Zurich" ./gradlew gretl:test gretl:dbTest gretl:s3Test
./gradlew gretl:build gretl:publishPluginMavenPublicationToMavenLocal -x test
# run: |
# ./gradlew gretl:build gretl:publishPluginMavenPublicationToMavenLocal -x test
- name: Debug1
run: |
ls -la ~/.m2/repository/ch/so/agi/gretl
- name: Integration tests (Plugin)
id: jarTest
run: |
TZ="Europe/Zurich" ./gradlew gretl:jarTest gretl:jarS3Test
- uses: actions/upload-artifact@v4
if: always() && (steps.jarTest.outcome == 'failure')
with:
name: reports-jar
path: gretl/build/reports/tests/
- name: Build Docker image for integration tests
run: |
./gradlew runtimeImage:buildImage
- name: List images
run: |
docker images
- name: Integration tests (Docker image)
id: imageTest
run: |
mkdir -p "$HOME"/gradlecache
chmod 777 -R "$HOME"/gradlecache
TZ="Europe/Zurich" ./gradlew gretl:imageTest gretl:imageS3Test
# run: |
# TZ="Europe/Zurich" ./gradlew gretl:imageTest --tests ch.so.agi.gretl.jobs.XslTransformerTest
- uses: actions/upload-artifact@v4
if: always() && (steps.imageTest.outcome == 'failure')
with:
name: reports-image
path: gretl/build/reports/tests/
- name: Login to Docker Container Registry
if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') && !env.ACT }}
uses: docker/login-action@v2
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') && !env.ACT }}
uses: docker/setup-buildx-action@v2
- name: Publish plugin
if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') && !env.ACT }}
run: ./gradlew gretl:publishPlugins -s
env:
gradlePublishKey: ${{ secrets.GRADLEPUBLISHKEY }}
gradlePublishSecret: ${{ secrets.GRADLEPUBLISHSECRET }}
- name: Build final multi-arch Docker image and push to registry
if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') && !env.ACT }}
run: |
./gradlew runtimeImage:buildAndPushMultiArchImage