@@ -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,101 @@ 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
+ framework-test :
49
49
# 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
50
+ # GitHub allocates runners portionally. Framework tests are time consuming. That's why we want to force them
51
51
# to start execution early.
52
52
needs : prepare-tests-matrix
53
- # Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
53
+ # Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
54
54
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
55
55
strategy :
56
- # The option forces to execute all jobs even though some of them have failed.
56
+ # The option forces to execute all jobs even though some of them have failed.
57
57
fail-fast : false
58
58
matrix : ${{ fromJson(needs.prepare-tests-matrix.outputs.matrix) }}
59
59
runs-on : ubuntu-20.04
60
60
container : unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0
61
61
steps :
62
- - name : Print environment variables
63
- run : printenv
64
-
65
- - name : Checkout repository
66
- uses : actions/checkout@v3
62
+ - name : Print environment variables
63
+ run : printenv
67
64
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/*
65
+ - name : Checkout repository
66
+ uses : actions/checkout@v3
87
67
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/*
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/monitoring.sh
77
+ ./scripts/monitoring.sh ${{ secrets.PUSHGATEWAY_HOSTNAME }} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}
78
+ - name : Run tests
79
+ run : |
80
+ gradle --no-daemon :utbot-framework-test: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-test/logs/*
87
+
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-test/build/reports/tests/test/*
102
102
103
103
104
104
project :
105
105
needs : prepare-tests-matrix
106
- # Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
106
+ # Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
107
107
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
108
108
strategy :
109
- # The option forces to execute all jobs even though some of them have failed.
109
+ # The option forces to execute all jobs even though some of them have failed.
110
110
fail-fast : false
111
111
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]
112
+ 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
113
runs-on : ubuntu-20.04
114
114
container : unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0
115
115
steps :
116
- - name : Print environment variables
117
- run : printenv
116
+ - name : Print environment variables
117
+ run : printenv
118
118
119
- - name : Checkout repository
120
- uses : actions/checkout@v3
119
+ - name : Checkout repository
120
+ uses : actions/checkout@v3
121
121
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 }}
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 }}
130
130
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/*
131
+ - name : Run monitoring
132
+ run : |
133
+ echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
134
+ chmod +x ./scripts/monitoring.sh
135
+ ./scripts/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/*
0 commit comments