Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: ensures markdown config doesn't trigger java tests #213

Merged
merged 2 commits into from
Jan 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 24 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,33 @@
name: test

# We don't test documentation-only commits.
on:
# We run tests on non-tagged pushes to master that aren't a commit made by the release plugin
push:
tags: ''
branches: master
paths-ignore: '**/*.md'
# We also run tests on pull requests targeted at the master branch.
pull_request:
branches: master
paths-ignore: '**/*.md'
on: # yamllint disable-line rule:truthy
push: # non-tagged pushes to master
branches:
- master
tags-ignore:
- '*'
paths-ignore:
- '**/*.md'
- ./build-bin/mlc_config.json
pull_request: # pull requests targeted at the master branch.
branches:
- master
paths-ignore:
- '**/*.md'
- ./build-bin/mlc_config.json

jobs:
test-javadoc:
name: Test JavaDoc Builds
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish
# skip commits made by the release plugin
if: "!contains(github.event.head_commit.message, 'maven-release-plugin')"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # full git history for license check
fetch-depth: 0 # full git history for license check
- name: Setup java
uses: actions/setup-java@v4
with:
Expand All @@ -40,11 +46,12 @@ jobs:

test:
name: test (JDK ${{ matrix.java_version }})
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish
# skip commits made by the release plugin
if: "!contains(github.event.head_commit.message, 'maven-release-plugin')"
strategy:
fail-fast: false # don't fail fast as sometimes failures are operating system specific
matrix: # use latest available versions and be consistent on all workflows!
fail-fast: false # don't fail fast as some failures are LTS specific
matrix: # match with maven-enforce-plugin rules in pom.xml
include:
- java_version: 17 # earliest LTS supported by Spring Boot 3
maven_args: -Prelease -Dgpg.skip -Dmaven.javadoc.skip=true
Expand All @@ -53,7 +60,7 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # full git history for license check
fetch-depth: 0 # full git history for license check
- name: Setup java
uses: actions/setup-java@v4
with:
Expand All @@ -63,6 +70,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.m2/repository
# yamllint disable-line rule:line-length
key: ${{ runner.os }}-jdk-${{ matrix.java_version }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-jdk-${{ matrix.java_version }}-maven-
# Don't attempt to cache Docker. Sensitive information can be stolen
Expand Down