Skip to content

Commit 4e37763

Browse files
committed
Merge branch 'main' into abdullin/constraint-model-synthesis
# Conflicts: # utbot-framework-test/src/test/kotlin/org/utbot/framework/assemble/AssembleModelGeneratorTests.kt # utbot-framework/src/main/kotlin/org/utbot/engine/Resolver.kt # utbot-framework/src/main/kotlin/org/utbot/engine/Traverser.kt # utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt # utbot-framework/src/main/kotlin/org/utbot/external/api/UtModelFactory.kt # utbot-framework/src/main/kotlin/org/utbot/framework/assemble/AssembleModelGenerator.kt # utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgMethodConstructor.kt # utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgVariableConstructor.kt # utbot-framework/src/main/kotlin/org/utbot/framework/concrete/UtExecutionInstrumentation.kt # utbot-framework/src/main/kotlin/org/utbot/framework/minimization/Minimization.kt # utbot-framework/src/main/kotlin/org/utbot/framework/plugin/api/TestCaseGenerator.kt # utbot-framework/src/main/kotlin/org/utbot/tests/infrastructure/TestSpecificTestCaseGenerator.kt
2 parents 1c6b679 + aa8f7a9 commit 4e37763

176 files changed

Lines changed: 4986 additions & 2308 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Bug report
33
about: Create a report to help us improve
44
title: ''
5-
labels: ''
5+
labels: 'bug'
66
assignees: ''
77

88
---

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Feature request
33
about: Suggest an idea for the UTBot project
44
title: ''
5-
labels: ''
5+
labels: 'enhancement'
66
assignees: ''
77

88
---

.github/workflows/build-and-run-tests-from-branch.yml

Lines changed: 82 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ env:
1919
IMAGE_NAME: utbot_java_cli
2020
DOCKERFILE_PATH: docker/Dockerfile_java_cli
2121
# Environment variable setting gradle options.
22-
GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -javaagent:/tmp/jmx-exporter.jar=12345:/tmp/jmx-exporter.yml -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false"
22+
GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false"
2323

2424
jobs:
25-
prepare-tests-matrix:
25+
prepare-matrices:
2626
runs-on: ubuntu-latest
2727
# Outputs are used for passing data to dependent jobs.
2828
outputs:
29-
matrix: ${{ steps.set-matrix.outputs.matrix }}
29+
framework-tests-matrix: ${{ steps.set-matrices.outputs.framework-tests-matrix }}
30+
combined-projects-matrix: ${{ steps.set-matrices.outputs.combined-projects-matrix }}
3031
steps:
3132
- name: Print environment variables
3233
run: printenv
@@ -37,26 +38,26 @@ jobs:
3738
- name: Check out ${{ github.event.inputs.commit_sha }} commit
3839
if: github.event.inputs.commit_sha != ''
3940
run: |
41+
git config --global --add safe.directory ${GITHUB_WORKSPACE}
4042
git fetch
4143
git checkout ${{ github.event.inputs.commit_sha }}
42-
- id: set-matrix
43-
name: Read and print config from framework-tests-matrix.json
44+
- id: set-matrices
45+
name: Read and print config from framework-tests-matrix.json and combined-projects-matrix.json
4446
run: |
45-
TASKS=$(echo $(cat .github/workflows/framework-tests-matrix.json))
46-
echo "::set-output name=matrix::$TASKS"
47-
echo $TASKS
48-
49-
framework-test:
50-
# This job does not need to wait for 'prepare-tests-matrix' result.
51-
# GitHub allocates runners portionally. Framework tests are time consuming. That's why we want to force them
52-
# to start execution early.
53-
needs: prepare-tests-matrix
54-
# Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
47+
FRAMEWORK_TESTS=$(echo $(cat .github/workflows/framework-tests-matrix.json))
48+
COMBINED_PROJECTS=$(echo $(cat .github/workflows/combined-projects-matrix.json))
49+
echo "::set-output name=framework-tests-matrix::$FRAMEWORK_TESTS"
50+
echo "::set-output name=combined-projects-matrix::$COMBINED_PROJECTS"
51+
echo $FRAMEWORK_TESTS
52+
echo $COMBINED_PROJECTS
53+
framework-tests:
54+
needs: prepare-matrices
55+
# Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
5556
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
5657
strategy:
5758
# The option forces to execute all jobs even though some of them have failed.
5859
fail-fast: false
59-
matrix: ${{ fromJson(needs.prepare-tests-matrix.outputs.matrix) }}
60+
matrix: ${{ fromJson(needs.prepare-matrices.outputs.framework-tests-matrix) }}
6061
runs-on: ubuntu-20.04
6162
container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0
6263
steps:
@@ -69,6 +70,7 @@ jobs:
6970
- name: Check out ${{ github.event.inputs.commit_sha }} commit
7071
if: github.event.inputs.commit_sha != ''
7172
run: |
73+
git config --global --add safe.directory ${GITHUB_WORKSPACE}
7274
git fetch
7375
git checkout ${{ github.event.inputs.commit_sha }}
7476
- name: Run monitoring
@@ -101,16 +103,75 @@ jobs:
101103
name: test_report ${{ matrix.project.PART_NAME }}
102104
path: utbot-framework-test/build/reports/tests/test/*
103105

106+
combined-projects:
107+
# This job does not need to wait for 'prepare-tests-matrix' result.
108+
# GitHub allocates runners portionally. Framework tests are time consuming. That's why we want to force them
109+
# to start execution early.
110+
needs: prepare-matrices
111+
# Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
112+
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
113+
strategy:
114+
# The option forces to execute all jobs even though some of them have failed.
115+
fail-fast: false
116+
matrix: ${{ fromJson(needs.prepare-matrices.outputs.combined-projects-matrix) }}
117+
runs-on: ubuntu-20.04
118+
container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0
119+
steps:
120+
- name: Print environment variables
121+
run: printenv
122+
123+
- name: Checkout repository
124+
uses: actions/checkout@v3
125+
126+
- name: Check out ${{ github.event.inputs.commit_sha }} commit
127+
if: github.event.inputs.commit_sha != ''
128+
run: |
129+
git config --global --add safe.directory ${GITHUB_WORKSPACE}
130+
git fetch
131+
git checkout ${{ github.event.inputs.commit_sha }}
132+
133+
- name: Run monitoring
134+
run: |
135+
echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
136+
chmod +x ./scripts/project/monitoring.sh
137+
./scripts/project/monitoring.sh ${{ secrets.PUSHGATEWAY_HOSTNAME }} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}
138+
- name: Build project ${{ matrix.projects.first }}
139+
id: first-project
140+
run: |
141+
cd ${{ matrix.projects.first }}
142+
gradle build --no-daemon
143+
- name: Build project ${{ matrix.projects.second }}
144+
if: ${{ steps.first-project.outcome != 'cancelled' && steps.first-project.outcome != 'skipped' }}
145+
run: |
146+
cd ${{ matrix.projects.second }}
147+
gradle build --no-daemon
148+
- name: Upload test report if tests have failed
149+
if: ${{ failure() }}
150+
uses: actions/upload-artifact@v3
151+
with:
152+
name: test_report ${{ matrix.projects.first }}
153+
path: ${{ matrix.projects.first }}/build/reports/tests/test/*
104154

105-
project:
106-
needs: prepare-tests-matrix
107-
# Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
155+
- name: Upload test report if tests have failed
156+
if: ${{ failure() }}
157+
uses: actions/upload-artifact@v3
158+
with:
159+
name: test_report ${{ matrix.projects.second }}
160+
path: ${{ matrix.projects.second }}/build/reports/tests/test/*
161+
162+
163+
single-project:
164+
# This job does not need to wait for 'prepare-tests-matrix' result.
165+
# GitHub allocates runners portionally. Framework tests are time consuming. That's why we want to force them
166+
# to start execution early.
167+
needs: prepare-matrices
168+
# Using matrices let create multiple jobs runs based on the combinations of the variables from matrices.
108169
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
109170
strategy:
110171
# The option forces to execute all jobs even though some of them have failed.
111172
fail-fast: false
112173
matrix:
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]
174+
project: [utbot-core, utbot-fuzzers, utbot-gradle, utbot-junit-contest, utbot-sample]
114175
runs-on: ubuntu-20.04
115176
container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0
116177
steps:
@@ -123,11 +184,9 @@ jobs:
123184
- name: Check out ${{ github.event.inputs.commit_sha }} commit
124185
if: github.event.inputs.commit_sha != ''
125186
run: |
187+
git config --global --add safe.directory ${GITHUB_WORKSPACE}
126188
git fetch
127189
git checkout ${{ github.event.inputs.commit_sha }}
128-
- uses: actions/checkout@v3
129-
with:
130-
ref: ${{ env.COMMIT_SHA }}
131190
132191
- name: Run monitoring
133192
run: |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"projects": [
3+
{
4+
"FIRST": "utbot-intellij",
5+
"SECOND": "utbot-cli",
6+
},
7+
{
8+
"FIRST": "utbot-instrumentation",
9+
"SECOND": "utbot-instrumentation-tests",
10+
},
11+
{
12+
"FIRST": "utbot-summary",
13+
"SECOND": "utbot-summary-tests",
14+
},
15+
{
16+
"FIRST": "utbot-api",
17+
"SECOND": "utbot-framework-api",
18+
}
19+
]
20+
}

.github/workflows/publish-on-github-packages.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,15 @@ jobs:
2727
- name: Print environment variables
2828
run: printenv
2929

30-
- uses: actions/checkout@v3
31-
with:
32-
ref: ${{ github.event.inputs.commit_sha }}
30+
- name: Checkout repository
31+
uses: actions/checkout@v3
32+
33+
- name: Check out ${{ github.event.inputs.commit_sha }} commit
34+
if: github.event.inputs.commit_sha != ''
35+
run: |
36+
git config --global --add safe.directory ${GITHUB_WORKSPACE}
37+
git fetch
38+
git checkout ${{ github.event.inputs.commit_sha }}
3339
3440
- uses: gradle/gradle-build-action@v2
3541
with:

.github/workflows/publish-plugin-and-cli-from-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: |
4141
# "You can make an environment variable available to any subsequent steps in a workflow job by
4242
# defining or updating the environment variable and writing this to the GITHUB_ENV environment file."
43-
echo "VERSION="$(date +%Y).$(date +%-m)"" >> $GITHUB_ENV
43+
echo "VERSION="$(date +%Y).$(date +%-m).${GITHUB_RUN_NUMBER}"" >> $GITHUB_ENV
4444
echo "POSTFIX=${{ github.event.inputs.version-postfix }}" >> $GITHUB_ENV
4545
4646
- name: Create version with postfix

.github/workflows/run-chosen-tests-from-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ on:
2929

3030
env:
3131
# Environment variable setting gradle options.
32-
GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -javaagent:/tmp/jmx-exporter.jar=12345:/tmp/jmx-exporter.yml -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false"
32+
GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false"
3333

3434
jobs:
3535
run-chosen-tests:

0 commit comments

Comments
 (0)