-
Notifications
You must be signed in to change notification settings - Fork 81
42 lines (40 loc) · 1.66 KB
/
readme_test.yml
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
# yamllint --format github .github/workflows/readme_test.yml
---
name: readme_test
# These test build commands mentioned in various README.md files.
#
# This doesn't literally scrape the README.md, so we don't test documentation-only commits.
on:
# We run tests on only on pull requests targeted at the master branch.
# * This skips master pushes as it is rare things not done in PRs break, and conserves resources
pull_request:
branches: master
paths-ignore: '**/*.md'
jobs:
readme_test:
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'zulu' # zulu as it supports a wide version range
java-version: '11' # Most recent LTS that passes tests
- 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-
# Don't attempt to cache Docker. Sensitive information can be stolen
# via forks, and login session ends up in ~/.docker. This is ok because
# we publish DOCKER_PARENT_IMAGE to ghcr.io, hence local to the runner.
- name: README.md # Tests the build which is re-used for docker
run: ./mvnw -T1C -q --batch-mode -DskipTests -Denforcer.fail=false package
- name: docker/README.md
run: build-bin/docker/docker_build openzipkin/zipkin-dependencies:test
env:
RELEASE_FROM_MAVEN_BUILD: true