-
Notifications
You must be signed in to change notification settings - Fork 78
81 lines (67 loc) · 1.97 KB
/
pull-request.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
74
75
76
77
78
79
80
81
# Triggers the workflow on pull request events to the main branch
name: Pull Request on Main Branch
on:
pull_request:
branches:
- main
- "release/**"
paths:
- ".github/workflows/pull-request.yaml"
- ".github/workflows/build-and-push.yaml"
- "pom.xml"
- "Makefile"
- "config"
- "src/**"
jobs:
build:
name: Build and Test Pull Request
if: github.repository == 'geoserver/geoserver-cloud'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Validate source code formatting
run: make lint
- name: Build without tests
run: |
make install
- name: Test
run: |
make test
- name: Build images
run: |
make build-image
- name: Install CI dependencies
run: python3 -m pip install --user --requirement=ci/requirements.txt
- name: Run acceptance tests datadir
run: |
make acceptance-tests-datadir
- name: Print docker compose logs datadir
run: (cd compose && c2cciutils-docker-logs)
if: always()
- name: Cleanup acceptance tests datadir
run: |
make clean-acceptance-tests-datadir
# FIXME: fix pgconfig discrepancies before reactivating
# - name: Run acceptance tests pgconfig
# run: |
# make acceptance-tests-pgconfig
# - name: Print docker compose logs pgconfig
# run: (cd compose && c2cciutils-docker-logs)
# if: always()
# - name: Cleanup acceptance tests pgconfig
# run: |
# make clean-acceptance-tests-pgconfig
- name: Remove project jars from cached repository
run: |
rm -rf ~/.m2/repository/org/geoserver
find ~/.m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {}