Moves to only support LTS JDKs #584
Workflow file for this run
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
# yamllint --format github .github/workflows/test.yml | |
--- | |
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" | |
- "charts/**" | |
# We also run tests on pull requests targeted at the master branch. | |
pull_request: | |
branches: master | |
paths-ignore: | |
- "**/*.md" | |
- "charts/**" | |
jobs: | |
test: | |
name: test (JDK ${{ matrix.java_version }}) | |
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish | |
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! | |
include: | |
- java_version: 11 # Last that can compile zipkin core to 1.6 for zipkin-reporter | |
maven_args: -Prelease -Dgpg.skip | |
- java_version: 17 # Most recent LTS (TODO: change to 21 including docker images as a separate step) | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # full git history for license check | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' # zulu as it supports a wide version range | |
java-version: ${{ matrix.java_version }} | |
- name: Cache local Maven repository | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-jdk-${{ matrix.java_version }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven- | |
- name: Cache NPM Packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-packages-${{ hashFiles('zipkin-lens/package-lock.json') }} | |
- name: Test without Docker | |
run: build-bin/maven_go_offline && build-bin/test -Ddocker.skip=true ${{ matrix.maven_args }} | |
test_docker: | |
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish | |
if: "!contains(github.event.head_commit.message, 'maven-release-plugin')" | |
strategy: | |
matrix: | |
include: | |
- name: zipkin-collector-kafka | |
- name: zipkin-collector-rabbitmq | |
- name: zipkin-storage-cassandra | |
- name: zipkin-storage-elasticsearch | |
- name: zipkin-storage-mysql-v1 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 # -Dlicense.skip=true so we don't need a full clone | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' # zulu as it supports a wide version range | |
java-version: '17' # Most recent LTS (TODO: change to 21 including docker images as a separate step) | |
- name: Cache local Maven repository | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven- | |
# We can't cache Docker without using buildx because GH actions restricts /var/lib/docker | |
# That's ok because DOCKER_PARENT_IMAGE is always ghcr.io and local anyway. | |
- name: Test with Docker | |
run: | |
| # configure_test seeds NPM cache, which isn't needed for these tests | |
build-bin/maven/maven_go_offline && | |
build-bin/docker/configure_docker && | |
build-bin/test -pl :${{ matrix.name }} --am -Dlicense.skip=true |