-
Notifications
You must be signed in to change notification settings - Fork 3.1k
135 lines (132 loc) · 5.73 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# 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"
- "charts/**"
jobs:
zipkin-server:
name: zipkin-server/README.md ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include: # ubuntu is tested as a part of the docker job
- name: macos
os: macos-latest
- name: windows
os: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 1
# Setup latest JDK. We do this to ensure users don't need to use the same version as our
# release process. Release uses JDK 11, the last version that can target 1.6 bytecode.
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: 15
- name: Cache NPM Packages
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-npm-packages-${{ hashFiles('zipkin-lens/package-lock.json') }}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Execute Server Build # command from zipkin-server/README.md
run: ./mvnw -T1C -q --batch-mode -DskipTests --also-make -pl zipkin-server clean package
docker:
runs-on: ubuntu-20.04 # newest available distribution, aka focal
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 1
# Remove apt repos that are known to break from time to time.
# See https://github.com/actions/virtual-environments/issues/323
- name: Remove broken apt repos
run: |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
# Setup latest JDK. We do this to ensure users don't need to use the same version as our
# release process. Release uses JDK 11, the last version that can target 1.6 bytecode.
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: 15
# 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: Cache NPM Packages
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-npm-packages-${{ hashFiles('zipkin-lens/package-lock.json') }}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: zipkin-server/README.md # Tests the build which is re-used for a few images
run: ./mvnw -T1C -q --batch-mode -DskipTests --also-make -pl zipkin-server clean package
- name: docker/README.md - openzipkin/zipkin
run: |
build-bin/docker/docker_build openzipkin/zipkin:test &&
build-bin/docker/docker_test_image openzipkin/zipkin:test
env:
RELEASE_FROM_MAVEN_BUILD: true
- name: docker/README.md - openzipkin/zipkin-slim
run: |
build-bin/docker/docker_build openzipkin/zipkin-slim:test &&
build-bin/docker/docker_test_image openzipkin/zipkin-slim:test
env:
DOCKER_TARGET: zipkin-slim
RELEASE_FROM_MAVEN_BUILD: true
- name: docker/test-images/zipkin-ui/README.md
run: |
build-bin/docker/docker_build openzipkin/zipkin-ui:test &&
build-bin/docker/docker_test_image openzipkin/zipkin-ui:test
env:
DOCKER_FILE: docker/test-images/zipkin-ui/Dockerfile
RELEASE_FROM_MAVEN_BUILD: true
- name: docker/test-images/zipkin-cassandra/README.md
run: |
build-bin/docker/docker_build openzipkin/zipkin-cassandra:test &&
build-bin/docker/docker_test_image openzipkin/zipkin-cassandra:test
env:
DOCKER_FILE: docker/test-images/zipkin-cassandra/Dockerfile
- name: docker/test-images/zipkin-elasticsearch6/README.md
run: |
build-bin/docker/docker_build openzipkin/zipkin-elasticsearch6:test &&
build-bin/docker/docker_test_image openzipkin/zipkin-elasticsearch6:test
env:
DOCKER_FILE: docker/test-images/zipkin-elasticsearch6/Dockerfile
- name: docker/test-images/zipkin-elasticsearch7/README.md
run: |
build-bin/docker/docker_build openzipkin/zipkin-elasticsearch7:test &&
build-bin/docker/docker_test_image openzipkin/zipkin-elasticsearch7:test
env:
DOCKER_FILE: docker/test-images/zipkin-elasticsearch7/Dockerfile
- name: docker/test-images/zipkin-kafka/README.md
run: |
build-bin/docker/docker_build openzipkin/zipkin-kafka:test &&
build-bin/docker/docker_test_image openzipkin/zipkin-kafka:test
env:
DOCKER_FILE: docker/test-images/zipkin-kafka/Dockerfile
- name: docker/test-images/zipkin-mysql/README.md
run: |
build-bin/docker/docker_build openzipkin/zipkin-mysql:test &&
build-bin/docker/docker_test_image openzipkin/zipkin-mysql:test
env:
DOCKER_FILE: docker/test-images/zipkin-mysql/Dockerfile