mirror of
https://github.com/geoserver/geoserver-cloud.git
synced 2025-12-08 20:16:08 +00:00
50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
# Triggers the workflow on pull request events to the main branch
|
|
name: Pull Request on Main Branch
|
|
on:
|
|
pull_request:
|
|
branches: [ main ]
|
|
paths:
|
|
- ".github/workflows/pull-request.yaml"
|
|
- ".github/workflows/build-and-push.yaml"
|
|
- "pom.xml"
|
|
- "Makefile"
|
|
- "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: '17'
|
|
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: Remove project jars from cached repository
|
|
run: |
|
|
rm -rf ~/.m2/repository/org/geoserver
|
|
find ~/.m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {}
|