@@ -30,10 +30,10 @@ jobs:
30
30
steps :
31
31
- name : Print environment variables
32
32
run : printenv
33
-
33
+
34
34
- name : Checkout repository
35
35
uses : actions/checkout@v3
36
-
36
+
37
37
- name : Check out ${{ github.event.inputs.commit_sha }} commit
38
38
if : github.event.inputs.commit_sha != ''
39
39
run : |
@@ -45,101 +45,102 @@ jobs:
45
45
TASKS=$(echo $(cat .github/workflows/framework-tests-matrix.json))
46
46
echo "::set-output name=matrix::$TASKS"
47
47
echo $TASKS
48
- framework :
48
+
49
+ framework-test :
49
50
# This job does not need to wait for 'prepare-tests-matrix' result.
50
- # GitHub allocates runners portionally. Framework tests are time consuming. That's why we want to force them
51
+ # GitHub allocates runners portionally. Framework tests are time consuming. That's why we want to force them
51
52
# to start execution early.
52
53
needs : prepare-tests-matrix
53
- # Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
54
+ # Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
54
55
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
55
56
strategy :
56
- # The option forces to execute all jobs even though some of them have failed.
57
+ # The option forces to execute all jobs even though some of them have failed.
57
58
fail-fast : false
58
59
matrix : ${{ fromJson(needs.prepare-tests-matrix.outputs.matrix) }}
59
60
runs-on : ubuntu-20.04
60
61
container : unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0
61
62
steps :
62
- - name : Print environment variables
63
- run : printenv
64
-
65
- - name : Checkout repository
66
- uses : actions/checkout@v3
63
+ - name : Print environment variables
64
+ run : printenv
67
65
68
- - name : Check out ${{ github.event.inputs.commit_sha }} commit
69
- if : github.event.inputs.commit_sha != ''
70
- run : |
71
- git fetch
72
- git checkout ${{ github.event.inputs.commit_sha }}
73
- - name : Run monitoring
74
- run : |
75
- echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
76
- chmod +x ./scripts/project/monitoring.sh
77
- ./scripts/project/monitoring.sh ${{ secrets.PUSHGATEWAY_HOSTNAME }} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}
78
- - name : Run tests
79
- run : |
80
- gradle --no-daemon :utbot-framework:test ${{ matrix.project.TESTS_TO_RUN }}
81
- - name : Upload logs
82
- if : ${{ always() }}
83
- uses : actions/upload-artifact@v3
84
- with :
85
- name : logs ${{ matrix.project.PART_NAME }}
86
- path : utbot-framework/logs/*
66
+ - name : Checkout repository
67
+ uses : actions/checkout@v3
68
+
69
+ - name : Check out ${{ github.event.inputs.commit_sha }} commit
70
+ if : github.event.inputs.commit_sha != ''
71
+ run : |
72
+ git fetch
73
+ git checkout ${{ github.event.inputs.commit_sha }}
74
+ - name : Run monitoring
75
+ run : |
76
+ echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
77
+ chmod +x ./scripts/project/monitoring.sh
78
+ ./scripts/project/monitoring.sh ${{ secrets.PUSHGATEWAY_HOSTNAME }} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}
79
+ - name : Run tests
80
+ run : |
81
+ gradle --no-daemon :utbot-framework-test:test ${{ matrix.project.TESTS_TO_RUN }}
82
+ - name : Upload logs
83
+ if : ${{ always() }}
84
+ uses : actions/upload-artifact@v3
85
+ with :
86
+ name : logs ${{ matrix.project.PART_NAME }}
87
+ path : utbot-framework-test/logs/*
87
88
88
- - name : Upload UTBot temp directory content
89
- if : ${{ always() }}
90
- uses : actions/upload-artifact@v3
91
- with :
92
- name : utbot_temp ${{ matrix.project.PART_NAME }}
93
- path : |
94
- /tmp/UTBot/generated*/*
95
- /tmp/UTBot/utbot-childprocess-errors/*
96
- - name : Upload test report if tests have failed
97
- if : ${{ failure() }}
98
- uses : actions/upload-artifact@v3
99
- with :
100
- name : test_report ${{ matrix.project.PART_NAME }}
101
- path : utbot-framework/build/reports/tests/test/*
89
+ - name : Upload UTBot temp directory content
90
+ if : ${{ always() }}
91
+ uses : actions/upload-artifact@v3
92
+ with :
93
+ name : utbot_temp ${{ matrix.project.PART_NAME }}
94
+ path : |
95
+ /tmp/UTBot/generated*/*
96
+ /tmp/UTBot/utbot-childprocess-errors/*
97
+ - name : Upload test report if tests have failed
98
+ if : ${{ failure() }}
99
+ uses : actions/upload-artifact@v3
100
+ with :
101
+ name : test_report ${{ matrix.project.PART_NAME }}
102
+ path : utbot-framework-test /build/reports/tests/test/*
102
103
103
104
104
105
project :
105
106
needs : prepare-tests-matrix
106
- # Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
107
+ # Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
107
108
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
108
109
strategy :
109
- # The option forces to execute all jobs even though some of them have failed.
110
+ # The option forces to execute all jobs even though some of them have failed.
110
111
fail-fast : false
111
112
matrix :
112
- project : [utbot-api, utbot-cli, utbot-core, utbot-framework-api, utbot-fuzzers, utbot-gradle, utbot-instrumentation, utbot-instrumentation-tests, utbot-intellij, utbot-junit-contest, utbot-rd, utbot-sample, utbot-summary, utbot-summary-tests]
113
+ project : [utbot-api, utbot-cli, utbot-core, utbot-framework, utbot-framework -api, utbot-fuzzers, utbot-gradle, utbot-instrumentation, utbot-instrumentation-tests, utbot-intellij, utbot-junit-contest, utbot-rd, utbot-sample, utbot-summary, utbot-summary-tests]
113
114
runs-on : ubuntu-20.04
114
115
container : unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0
115
116
steps :
116
- - name : Print environment variables
117
- run : printenv
117
+ - name : Print environment variables
118
+ run : printenv
118
119
119
- - name : Checkout repository
120
- uses : actions/checkout@v3
120
+ - name : Checkout repository
121
+ uses : actions/checkout@v3
121
122
122
- - name : Check out ${{ github.event.inputs.commit_sha }} commit
123
- if : github.event.inputs.commit_sha != ''
124
- run : |
125
- git fetch
126
- git checkout ${{ github.event.inputs.commit_sha }}
127
- - uses : actions/checkout@v3
128
- with :
129
- ref : ${{ env.COMMIT_SHA }}
123
+ - name : Check out ${{ github.event.inputs.commit_sha }} commit
124
+ if : github.event.inputs.commit_sha != ''
125
+ run : |
126
+ git fetch
127
+ git checkout ${{ github.event.inputs.commit_sha }}
128
+ - uses : actions/checkout@v3
129
+ with :
130
+ ref : ${{ env.COMMIT_SHA }}
130
131
131
- - name : Run monitoring
132
- run : |
133
- echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
134
- chmod +x ./scripts/project/monitoring.sh
135
- ./scripts/project/monitoring.sh ${{ secrets.PUSHGATEWAY_HOSTNAME }} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}
136
- - name : Run tests
137
- run : |
138
- cd ${{ matrix.project }}
139
- gradle build --no-daemon
140
- - name : Upload test report if tests have failed
141
- if : ${{ failure() }}
142
- uses : actions/upload-artifact@v3
143
- with :
144
- name : test_report ${{ matrix.project }}
145
- path : ${{ matrix.project }}/build/reports/tests/test/*
132
+ - name : Run monitoring
133
+ run : |
134
+ echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
135
+ chmod +x ./scripts/project/monitoring.sh
136
+ ./scripts/project/monitoring.sh ${{ secrets.PUSHGATEWAY_HOSTNAME }} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}
137
+ - name : Run tests
138
+ run : |
139
+ cd ${{ matrix.project }}
140
+ gradle build --no-daemon
141
+ - name : Upload test report if tests have failed
142
+ if : ${{ failure() }}
143
+ uses : actions/upload-artifact@v3
144
+ with :
145
+ name : test_report ${{ matrix.project }}
146
+ path : ${{ matrix.project }}/build/reports/tests/test/*
0 commit comments