Continuous Integration #124
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Continuous Integration workflow. | |
# | |
name: Continuous Integration | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# | |
# Run every Saturday whether there have been changes or not. | |
# Hopefully this will keep us in sync with upstream changes. | |
# | |
schedule: | |
- cron: '17 8 * * SAT' | |
# | |
# Allow manual invocation, for example for feature branches. | |
# | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Java JDK | |
uses: actions/[email protected] | |
with: | |
java-version: 17 | |
distribution: corretto | |
- name: Set up Maven | |
uses: s4u/[email protected] | |
with: | |
servers: | | |
[{ | |
"id": "ukf-packages", | |
"username": "${{ github.actor }}", | |
"password": "${{ secrets.GITHUB_TOKEN }}" | |
}] | |
- name: Cache local Maven repository | |
uses: actions/[email protected] | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Which Maven? | |
run: mvn -v | |
- name: Build and test | |
run: mvn --batch-mode --update-snapshots clean verify |