-
Notifications
You must be signed in to change notification settings - Fork 13
95 lines (95 loc) · 3.71 KB
/
test.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
name: Test
run-name: "#${{ github.run_number }} test by ${{ github.triggering_actor }}"
on:
# pull_request:
# paths:
# - "testit-adapter-behave/**"
# - "testit-adapter-nose/**"
# - "testit-adapter-pytest/**"
# - "testit-adapter-robotframework/**"
# - "testit-python-commons/**"
# - "requirements.txt"
# - ".github/**/test.yml"
workflow_dispatch:
env:
DOTNET_VERSION: 8
GITHUB_PAT: ${{ secrets.SERVICE_ACCOUNT_TOKEN }}
PYTHON_VERSION: 3.12
TEMP_FILE: tmp/output.txt
TMS_ADAPTER_MODE: 1
TMS_CERT_VALIDATION: false
TMS_PRIVATE_TOKEN: ${{ secrets.TESTIT_PRIVATE_TOKEN }}
TMS_URL: ${{ secrets.TESTIT_URL }}
# jobs:
# test:
# name: ${{ matrix.project_name }}
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# include:
# - adapter_name: testit-adapter-behave
# configuration_id: BEHAVE_CONFIGURATION_ID
# project_id: BEHAVE_PROJECT_ID
# project_name: behave
# test_command: 'behave -f testit_adapter_behave.formatter:AdapterFormatter'
# - adapter_name: testit-adapter-nose
# configuration_id: NOSE_CONFIGURATION_ID
# project_id: NOSE_PROJECT_ID
# project_name: nose
# test_command: 'nose2 --testit'
# - adapter_name: testit-adapter-pytest
# configuration_id: PYTEST_CONFIGURATION_ID
# project_id: PYTEST_PROJECT_ID
# project_name: pytest
# test_command: 'pytest --testit'
# - adapter_name: testit-adapter-robotframework
# configuration_id: ROBOT_FRAMEWORK_CONFIGURATION_ID
# project_id: ROBOT_FRAMEWORK_PROJECT_ID
# project_name: robotFramework
# test_command: 'robot -v testit tests'
# env:
# TMS_CONFIGURATION_ID: ${{ secrets[matrix.configuration_id] }}
# TMS_PROJECT_ID: ${{ secrets[matrix.project_id] }}
# TMS_TEST_RUN_NAME: ${{ matrix.project_name }} TestRun
# steps:
# - name: Checkout adapters-python
# uses: actions/checkout@v4
# - name: Checkout api-validator-dotnet
# uses: actions/checkout@v4
# with:
# repository: testit-tms/api-validator-dotnet
# token: ${{ env.GITHUB_PAT }}
# path: api-validator-dotnet
# - name: Checkout python-examples
# uses: actions/checkout@v4
# with:
# repository: testit-tms/python-examples
# path: python-examples
# - name: Setup dotnet
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: ${{ env.DOTNET_VERSION }}
# - name: Setup python
# uses: actions/setup-python@v5
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# - name: Create TestRun
# run: |
# pip3 install testit-cli
# testit testrun create --token ${{ env.TMS_PRIVATE_TOKEN }} --output ${{ env.TEMP_FILE }}
# echo "TMS_TEST_RUN_ID=$(<${{ env.TEMP_FILE }})" >> $GITHUB_ENV
# pip3 uninstall -y -r <(pip freeze)
# - name: Setup environment
# run: |
# dotnet build --configuration Debug --property WarningLevel=0 api-validator-dotnet
# pip3 install -r python-examples/${{ matrix.project_name }}/requirements_ci.txt
# pip3 install --force-reinstall ./testit-python-commons
# pip3 install --force-reinstall ./${{ matrix.adapter_name }}
# - name: Test
# run: |
# cd python-examples/${{ matrix.project_name }}
# eval "${{ matrix.test_command }}" || exit 0
# - name: Validate
# run: |
# dotnet test --configuration Debug --no-build --logger:"console;verbosity=detailed" api-validator-dotnet