File tree Expand file tree Collapse file tree 1 file changed +2
-46
lines changed Expand file tree Collapse file tree 1 file changed +2
-46
lines changed Original file line number Diff line number Diff line change 9
9
- main
10
10
11
11
jobs :
12
- determine_changed :
13
- name : " Determine changed modules"
14
- runs-on : ubuntu-22.04
15
- if : (github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || github.event_name == 'pull_request'
16
- outputs :
17
- modules : ${{ steps.changed-modules.outputs.modules }}
18
- steps :
19
- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20
- with :
21
- fetch-depth : 2
22
- submodules : true
23
-
24
- - name : Set up JDK 17
25
- uses : actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
26
- with :
27
- java-version : 17
28
- distribution : temurin
29
- cache : gradle
30
-
31
- - id : changed-modules
32
- run : |
33
- git diff --name-only HEAD~1 | xargs printf -- '--changed-git-paths %s\n' | xargs ./gradlew writeChangedProjects --output-file-path=modules.json
34
- echo modules=$(cat modules.json) >> $GITHUB_OUTPUT
35
-
36
12
check_format :
37
13
name : " Check Format"
38
14
runs-on : ubuntu-22.04
39
- needs :
40
- - determine_changed
41
- strategy :
42
- fail-fast : false
43
- matrix :
44
- module : ${{ fromJSON(needs.determine_changed.outputs.modules) }}
45
15
46
16
steps :
47
17
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
48
18
with :
49
- fetch-depth : 2
50
19
submodules : true
51
20
52
21
- name : Set up JDK 17
56
25
distribution : temurin
57
26
cache : gradle
58
27
59
- - name : ${{ matrix.module }} Check Format
60
- run : |
61
- ./gradlew ${{matrix.module}}:spotlessCheck
62
-
63
- # A job that fails if any job in the check_format matrix fails,
64
- # to be used as a required check for merging.
65
- check_all :
66
- runs-on : ubuntu-22.04
67
- if : always()
68
- name : Check Format (matrix)
69
- needs : check_format
70
- steps :
71
- - name : Check matrix
72
- if : needs.check_format.result != 'success'
73
- run : exit 1
28
+ - name : Run Spotless
29
+ run : ./gradlew ${{matrix.module}}:spotlessCheck
You can’t perform that action at this time.
0 commit comments