-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathrun-chosen-tests-from-branch.yml
More file actions
76 lines (66 loc) · 2.69 KB
/
run-chosen-tests-from-branch.yml
File metadata and controls
76 lines (66 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: "[M] Run chosen tests"
permissions: read-all
on:
workflow_dispatch:
inputs:
project-name:
type: choice
description: "Project you want to run tests for."
required: true
default: utbot-framework
options:
- utbot-analytics
- utbot-cli
- utbot-core
- utbot-framework-api
- utbot-framework
- utbot-java-fuzzing
- utbot-gradle
- utbot-instrumentation-tests
- utbot-instrumentation
- utbot-intellij
- utbot-sample
- utbot-summary
- utbot-summary-tests
tests-bunch-name:
type: string
required: true
description: "{package-name}.{class-name-optional}.{test-name-optional}"
env:
PUSHGATEWAY_HOSTNAME: monitoring.utbot.org
jobs:
run-chosen-tests:
runs-on: ubuntu-20.04
container: unittestbot/java-env:java17-zulu-jdk-gradle7.6.1-kotlinc1.8.0
steps:
- name: Print environment variables
run: printenv
- uses: actions/checkout@v3
- name: Run monitoring
run: |
echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
chmod +x ./scripts/project/monitoring.sh
./scripts/project/monitoring.sh ${PUSHGATEWAY_HOSTNAME} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}
- name: Run chosen tests
run: |
gradle :${{ github.event.inputs.project-name }}:test -PprojectType=Ultimate --no-daemon --build-cache --no-parallel -PgithubActor=${{ github.actor }} -PgithubToken=${{ secrets.PACKAGES_RO_TOKEN }} -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g --tests ${{ github.event.inputs.tests-bunch-name }}
- name: Upload ${{ github.event.inputs.project-name }} tests report if tests have failed
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.inputs.project-name }}-tests-report
path: ${{ github.event.inputs.project-name }}/build/reports/tests/test/*
- name: Upload generated tests
if: ${{ always() && github.event.inputs.project-name == 'utbot-framework' }}
uses: actions/upload-artifact@v3
with:
name: generated-tests
path: |
/tmp/UTBot/generated*/*
/tmp/UTBot/utbot-instrumentedprocess-errors/*
- name: Upload utbot-framework logs
if: ${{ always() && github.event.inputs.project-name == 'utbot-framework' }}
uses: actions/upload-artifact@v3
with:
name: utbot-framework-logs
path: utbot-framework/logs/*