Skip to content

Commit 7eee4b1

Browse files
committed
chore(google-auth-library-java): migrate and adapt GitHub Actions workflows
1 parent 116de24 commit 7eee4b1

18 files changed

+67
-488
lines changed

google-auth-library-java/.github/workflows/ci.yaml renamed to .github/workflows/google-auth-library-java-ci.yaml

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,25 @@ on:
1818
branches:
1919
- main
2020
pull_request:
21-
name: ci
21+
name: google-auth-library-java ci
22+
env:
23+
BUILD_SUBDIR: google-auth-library-java
2224
jobs:
25+
filter:
26+
runs-on: ubuntu-latest
27+
outputs:
28+
library: ${{ steps.filter.outputs.library }}
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: dorny/paths-filter@v3
32+
id: filter
33+
with:
34+
filters: |
35+
library:
36+
- 'google-auth-library-java/**'
2337
units:
38+
needs: filter
39+
if: ${{ needs.filter.outputs.library == 'true' }}
2440
runs-on: ubuntu-latest
2541
strategy:
2642
fail-fast: false
@@ -37,6 +53,8 @@ jobs:
3753
env:
3854
JOB_TYPE: test
3955
units-logging:
56+
needs: filter
57+
if: ${{ needs.filter.outputs.library == 'true' }}
4058
runs-on: ubuntu-latest
4159
strategy:
4260
fail-fast: false
@@ -53,6 +71,8 @@ jobs:
5371
env:
5472
JOB_TYPE: test-logging
5573
units-java8:
74+
needs: filter
75+
if: ${{ needs.filter.outputs.library == 'true' }}
5676
# Building using Java 17 and run the tests with Java 8 runtime
5777
name: "units (8)"
5878
runs-on: ubuntu-latest
@@ -65,7 +85,7 @@ jobs:
6585
- name: "Set jvm system property environment variable for surefire plugin (unit tests)"
6686
# Maven surefire plugin (unit tests) allows us to specify JVM to run the tests.
6787
# https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
68-
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV
88+
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java -P !java17" >> $GITHUB_ENV
6989
shell: bash
7090
- uses: actions/setup-java@v4
7191
with:
@@ -75,8 +95,12 @@ jobs:
7595
env:
7696
JOB_TYPE: test
7797
windows:
98+
needs: filter
99+
if: ${{ needs.filter.outputs.library == 'true' }}
78100
runs-on: windows-latest
79101
steps:
102+
- name: Support longpaths
103+
run: git config --system core.longpaths true
80104
- name: Support longpaths
81105
run: git config --system core.longpaths true
82106
- uses: actions/checkout@v4
@@ -85,10 +109,12 @@ jobs:
85109
distribution: temurin
86110
java-version: 8
87111
- run: java -version
88-
- run: .kokoro/build.bat
112+
- run: .kokoro/build.sh
89113
env:
90114
JOB_TYPE: test
91115
dependencies:
116+
needs: filter
117+
if: ${{ needs.filter.outputs.library == 'true' }}
92118
runs-on: ubuntu-latest
93119
strategy:
94120
matrix:
@@ -102,6 +128,8 @@ jobs:
102128
- run: java -version
103129
- run: .kokoro/dependencies.sh
104130
javadoc:
131+
needs: filter
132+
if: ${{ needs.filter.outputs.library == 'true' }}
105133
runs-on: ubuntu-latest
106134
steps:
107135
- uses: actions/checkout@v4
@@ -114,6 +142,8 @@ jobs:
114142
env:
115143
JOB_TYPE: javadoc
116144
lint:
145+
needs: filter
146+
if: ${{ needs.filter.outputs.library == 'true' }}
117147
runs-on: ubuntu-latest
118148
steps:
119149
- uses: actions/checkout@v4
@@ -125,15 +155,3 @@ jobs:
125155
- run: .kokoro/build.sh
126156
env:
127157
JOB_TYPE: lint
128-
clirr:
129-
runs-on: ubuntu-latest
130-
steps:
131-
- uses: actions/checkout@v4
132-
- uses: actions/setup-java@v4
133-
with:
134-
distribution: temurin
135-
java-version: 8
136-
- run: java -version
137-
- run: .kokoro/build.sh
138-
env:
139-
JOB_TYPE: clirr

google-auth-library-java/.github/workflows/downstream.yaml renamed to .github/workflows/google-auth-library-java-downstream.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,25 @@ on:
33
types: [ labeled ]
44
branches:
55
- main
6-
name: downstream
6+
name: google-auth-library-java downstream
7+
env:
8+
BUILD_SUBDIR: google-auth-library-java
79
jobs:
10+
filter:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
library: ${{ steps.filter.outputs.library }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: dorny/paths-filter@v3
17+
id: filter
18+
with:
19+
filters: |
20+
library:
21+
- 'google-auth-library-java/**'
822
dependencies:
23+
needs: filter
24+
if: ${{ needs.filter.outputs.library == 'true' }}
925
if: ${{ github.event.label.name == 'downstream-check:run' }}
1026
runs-on: ubuntu-latest
1127
strategy:

google-auth-library-java/.github/workflows/sonar.yaml renamed to .github/workflows/google-auth-library-java-sonar.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
1-
name: SonarCloud
1+
name: google-auth-library-java SonarCloud
22
on:
33
push:
44
branches:
55
- main
66
pull_request:
77
types: [opened, synchronize, reopened]
8+
env:
9+
BUILD_SUBDIR: google-auth-library-java
810
jobs:
11+
filter:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
library: ${{ steps.filter.outputs.library }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: dorny/paths-filter@v3
18+
id: filter
19+
with:
20+
filters: |
21+
library:
22+
- 'google-auth-library-java/**'
923
build:
24+
needs: filter
25+
if: ${{ needs.filter.outputs.library == 'true' }}
1026
name: Build
1127
runs-on: ubuntu-22.04
1228
# Sonar Token can't be passed to PRs from forks. Disable Sonar workflow unless PR is from a branch.

google-auth-library-java/.github/CODEOWNERS

Lines changed: 0 additions & 70 deletions
This file was deleted.

google-auth-library-java/.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

google-auth-library-java/.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 51 deletions
This file was deleted.

google-auth-library-java/.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

google-auth-library-java/.github/ISSUE_TEMPLATE/support_request.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

google-auth-library-java/.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

google-auth-library-java/.github/auto-label.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)