-
Notifications
You must be signed in to change notification settings - Fork 26
101 lines (98 loc) · 4.28 KB
/
record-build-and-test-results-action.yml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: record-build-and-test-results-action
on:
push:
branches:
- main
- github-test-result-action # for debug
paths:
- "launchable-test-result//**"
- ".github/workflows/record-build-and-test-results-action.yml" # for debug
pull_request:
branches:
- main
- github-test-result-action # for debug
paths:
- "launchable-test-result//**"
- ".github/workflows/record-build-and-test-results-action.yml" # for debug
env:
LAUNCHABLE_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_PYTEST }}
LAUNCHABLE_DEBUG: 1
LAUNCHABLE_REPORT_ERROR: 1
jobs:
basic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Record build and test results action
uses: launchableinc/record-build-and-test-results-action@support-flavor-and-test-session-name-options
with:
report_path: launchable-test-result/test-results.xml
test_runner: pytest
if: always()
- name: Record build and test results action with no build
uses: launchableinc/record-build-and-test-results-action@support-flavor-and-test-session-name-options
with:
report_path: launchable-test-result/test-results.xml
test_runner: pytest
no_build: true
if: always()
custom-values:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Record build and test results action with test_session_name option
uses: launchableinc/record-build-and-test-results-action@support-flavor-and-test-session-name-options
with:
report_path: launchable-test-result/test-results.xml
test_runner: pytest
test_session_name: ${{ github.run_id }}
if: always()
- name: Record build and test results action with test_session_name option part 2
uses: launchableinc/record-build-and-test-results-action@support-flavor-and-test-session-name-options
with:
report_path: launchable-test-result/test-results.xml
test_runner: pytest
test_session_name: ${{ github.run_id }}
if: always()
- name: Record build and test results action with custom build name
uses: launchableinc/record-build-and-test-results-action@support-flavor-and-test-session-name-options
with:
report_path: launchable-test-result/test-results.xml
test_runner: pytest
build_name: ${{ github.run_id }}-${{ github.job }}
matrix-case:
strategy:
matrix:
python_version: ['3.12', '3.11', '3.10']
os: ['ubuntu-latest', 'windows-latest']
runs-on: ubuntu-latest
steps:
- name: Replace python version's dot to hyphen
run: |
python_version=$(echo "${{ matrix.python_version }}" | sed 's/\./-/g')
echo "python_version=$python_version" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Record build and test results action with custom build name and test_session_name option with flavor
uses: launchableinc/record-build-and-test-results-action@support-flavor-and-test-session-name-options
with:
report_path: launchable-test-result/test-results.xml
test_runner: pytest
build_name: ${{ github.run_id }}-${{ github.job }}
test_session_name: ${{ github.run_id }}-${{ github.job }}-${{ matrix.os }}-${{ env.python_version }}
flavors: 'build_name=true, test_session_name=true, flavors=true, count=1, python_version=${{ matrix.python_version }}, os=${{ matrix.os }}'
if: always()
- name: Record build and test results action with custom build name and test_session_name option with flavor part 2
uses: launchableinc/record-build-and-test-results-action@support-flavor-and-test-session-name-options
with:
report_path: launchable-test-result/test-results.xml
test_runner: pytest
build_name: ${{ github.run_id }}-${{ github.job }}
test_session_name: ${{ github.run_id }}-${{ github.job }}-${{ matrix.os }}-${{ env.python_version }}
flavors: 'build_name=true, test_session_name=true, flavors=true, count=2, python_version=${{ matrix.python_version }}, os=${{ matrix.os }}'
if: always()