Skip to content

Commit

Permalink
Merge pull request #12 from testit-tms/PavelButuzov-patch-1
Browse files Browse the repository at this point in the history
Update test.yml
  • Loading branch information
PavelButuzov authored Sep 17, 2024
2 parents 15f6351 + 99777f4 commit bfddc20
Showing 1 changed file with 58 additions and 58 deletions.
116 changes: 58 additions & 58 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Test
run-name: "#${{ github.run_number }} test by ${{ github.triggering_actor }}"
on:
pull_request:
paths:
- "pkg/tms/**"
- "examples/**"
- "go.mod"
- "tms.config.json"
- ".github/**/test.yml"
# pull_request:
# paths:
# - "pkg/tms/**"
# - "examples/**"
# - "go.mod"
# - "tms.config.json"
# - ".github/**/test.yml"
workflow_dispatch:
env:
DOTNET_VERSION: 8
Expand All @@ -20,54 +20,54 @@ env:
TMS_PRIVATE_TOKEN: ${{ secrets.TESTIT_PRIVATE_TOKEN }}
TMS_URL: ${{ secrets.TESTIT_URL }}
TMS_CONFIG_FILE: ${{ github.workspace }}/tms.config.json
jobs:
test:
name: ${{ matrix.project_name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- configuration_id: GOLANG_CONFIGURATION_ID
project_id: GOLANG_PROJECT_ID
project_name: golang
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-go
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: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup environment
run: |
dotnet build --configuration Debug --property WarningLevel=0 api-validator-dotnet
pip install testit-cli
- name: Create TestRun
run: |
testit testrun create --token ${{ env.TMS_PRIVATE_TOKEN }} --output ${{ env.TEMP_FILE }}
echo "TMS_TEST_RUN_ID=$(<${{ env.TEMP_FILE }})" >> $GITHUB_ENV
- name: Test
run: |
cd examples
go test || exit 0
- name: Validate
run: |
dotnet test --configuration Debug --no-build --logger:"console;verbosity=detailed" api-validator-dotnet
# jobs:
# test:
# name: ${{ matrix.project_name }}
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# include:
# - configuration_id: GOLANG_CONFIGURATION_ID
# project_id: GOLANG_PROJECT_ID
# project_name: golang
# 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-go
# 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: Setup dotnet
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: ${{ env.DOTNET_VERSION }}
# - name: Setup go
# uses: actions/setup-go@v4
# with:
# go-version: ${{ env.GOLANG_VERSION }}
# - name: Setup python
# uses: actions/setup-python@v5
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# - name: Setup environment
# run: |
# dotnet build --configuration Debug --property WarningLevel=0 api-validator-dotnet
# pip install testit-cli
# - name: Create TestRun
# run: |
# testit testrun create --token ${{ env.TMS_PRIVATE_TOKEN }} --output ${{ env.TEMP_FILE }}
# echo "TMS_TEST_RUN_ID=$(<${{ env.TEMP_FILE }})" >> $GITHUB_ENV
# - name: Test
# run: |
# cd examples
# go test || exit 0
# - name: Validate
# run: |
# dotnet test --configuration Debug --no-build --logger:"console;verbosity=detailed" api-validator-dotnet

0 comments on commit bfddc20

Please sign in to comment.