This repository was archived by the owner on Mar 27, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 9
9
pull_request :
10
10
branches : [ main ]
11
11
workflow_dispatch :
12
+
13
+ env :
14
+ EXERCISES_DIRECTORY : ./code
12
15
13
16
jobs :
14
- get -exercises :
17
+ list -exercises :
15
18
runs-on : ubuntu-latest
16
19
outputs :
17
- matrix : ${{steps.list_dirs .outputs.matrix }}
20
+ exercises : ${{steps.list .outputs.exercises }}
18
21
steps :
19
22
- uses : actions/checkout@v2
20
- - id : list_dirs
21
- run : echo "::set-output name=matrix ::$(ls code | jq -cnR '[inputs | select(length>0)]')"
23
+ - id : list
24
+ run : echo "::set-output name=exercises ::$(ls $EXERCISES_DIRECTORY | jq -cnR '[inputs | select(length>0)]')"
22
25
build :
23
26
runs-on : ubuntu-latest
24
- needs : get -exercises
27
+ needs : list -exercises
25
28
strategy :
26
29
fail-fast : false
27
30
matrix :
28
- subdir : ${{fromJson(needs.get -exercises.outputs.matrix )}}
31
+ exercise : ${{fromJson(needs.list -exercises.outputs.exercises )}}
29
32
steps :
30
33
- uses : actions/checkout@v3
31
34
- name : Set up JDK
35
38
distribution : ' temurin'
36
39
cache : maven
37
40
- name : Test with Maven
38
- run : mvn -B verify --file code/${{matrix.subdir}}/pom.xml
41
+ run : mvn -B verify --file pom.xml
42
+ working-directory : $EXERCISES_DIRECTORY/${{matrix.exercise}}
You can’t perform that action at this time.
0 commit comments