forked from UnitTestBot/UTBotJava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-chosen-tests-from-branch.yml
More file actions
60 lines (53 loc) · 1.84 KB
/
run-chosen-tests-from-branch.yml
File metadata and controls
60 lines (53 loc) · 1.84 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
name: "[M] Run chosen tests"
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-framework-api
- utbot-framework
- utbot-fuzzers
- utbot-gradle
- utbot-instrumentation-tests
- utbot-instrumentation
- utbot-intellij
tests-bunch-name:
type: string
required: true
description: "{package-name}.{class-name}.{test-name-optional}"
jobs:
run-chosen-tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'zulu'
java-package: jdk+fx
cache: gradle
- uses: gradle/gradle-build-action@v2
with:
gradle-version: 6.8
- name: Run chosen tests
run: |
export KOTLIN_HOME="/usr"
gradle :${{ github.event.inputs.project-name }}:test --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@v2
with:
name: ${{ github.event.inputs.project-name }}-tests-report
path: ${{ github.event.inputs.project-name }}/build/reports/tests/test/*
- name: Upload utbot-framework logs if utbot-framework tests have failed
if: ${{ failure() || (github.event.inputs.project-name == 'utbot-framework') }}
uses: actions/upload-artifact@v2
with:
name: utbot_framework_logs
path: utbot-framework/logs/*