Skip to content

Commit 4b9775b

Browse files
committed
Add CI/CD improvements
1 parent fc7f698 commit 4b9775b

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,74 @@ on:
1313
workflow_dispatch: {}
1414

1515
jobs:
16+
validate:
17+
name: Validate
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 5
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v6
24+
25+
###
26+
### Lint scripts and configuration files.
27+
###
28+
29+
- name: Validate shell scripts
30+
uses: ludeeus/action-shellcheck@master
31+
if: ${{ ! cancelled() }}
32+
with:
33+
check_together: 'yes'
34+
scandir: ./scripts
35+
36+
- name: Validate codecov.yml
37+
shell: bash
38+
if: ${{ ! cancelled() }}
39+
run: curl -si --fail-with-body --data-binary @codecov.yml https://codecov.io/validate
40+
41+
###
42+
### Lint GitHub Actions for issues.
43+
###
44+
45+
- name: Lint GitHub Actions
46+
shell: bash
47+
if: ${{ ! cancelled() }}
48+
run: >-
49+
docker run
50+
--rm
51+
--user "$(id -u "${USER}"):$(id -g "${USER}")"
52+
--volume "$(pwd):/repo"
53+
--workdir /repo
54+
rhysd/actionlint:latest
55+
-color
56+
-verbose
57+
58+
###
59+
### Lint Java, export information about current environment for
60+
### the next jobs to utilise.
61+
###
62+
63+
- name: Initialize Java
64+
uses: actions/setup-java@v5
65+
if: always()
66+
with:
67+
cache: maven
68+
distribution: zulu
69+
java-version: 25
70+
71+
- name: Validate license headers and code style
72+
shell: bash
73+
if: ${{ ! cancelled() }}
74+
# Purposely compile here so errorprone can run when we turn it on
75+
run: ./mvnw -B validate compile test-compile -DskipTests
76+
1677
build:
1778
name: Build on JDK ${{ matrix.java-version }} (${{ matrix.os-name }})
1879
runs-on: ${{ matrix.os-name }}
1980

81+
needs:
82+
- validate
83+
2084
strategy:
2185
fail-fast: false
2286
matrix:

0 commit comments

Comments
 (0)