#198 test by testit-owner #198
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
run-name: "#${{ github.run_number }} test by ${{ github.triggering_actor }}" | |
on: | |
pull_request: | |
paths: | |
- "testit-adapter-cucumber4/**" | |
- "testit-adapter-cucumber5/**" | |
- "testit-adapter-cucumber6/**" | |
- "testit-adapter-cucumber7/**" | |
- "testit-adapter-jbehave/**" | |
- "testit-adapter-junit4/**" | |
- "testit-adapter-junit5/**" | |
- "testit-adapter-selenide/**" | |
- "testit-adapter-testng/**" | |
- "testit-java-commons/**" | |
- "build.gradle.kts" | |
- "gradle.properties" | |
- "settings.gradle.kts" | |
- ".github/**/test.yml" | |
workflow_dispatch: | |
env: | |
DOTNET_VERSION: 8 | |
GITHUB_PAT: ${{ secrets.SERVICE_ACCOUNT_TOKEN }} | |
JAVA_DISTRIBUTION: "temurin" | |
JAVA_VERSION: 17 | |
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-gradle: | |
name: ${{ matrix.project_name }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# - project_name: cucubmer7-gradle-testng | |
# configuration_id: CUCUMBER7_GRADLE_TESTNG_CONFIGURATION_ID | |
# project_id: CUCUMBER7_GRADLE_TESTNG_PROJECT_ID | |
# - project_name: cucumber7-gradle-junit4 | |
# configuration_id: CUCUMBER7_GRADLE_JUNIT4_CONFIGURATION_ID | |
# project_id: CUCUMBER7_GRADLE_JUNIT4_PROJECT_ID | |
# - project_name: gradle-junit4 | |
# configuration_id: GRADLE_JUNIT4_CONFIGURATION_ID | |
# project_id: GRADLE_JUNIT4_PROJECT_ID | |
# - project_name: gradle-junit5 | |
# configuration_id: GRADLE_JUNIT5_CONFIGURATION_ID | |
# project_id: GRADLE_JUNIT5_PROJECT_ID | |
# - project_name: gradle-testng | |
# configuration_id: GRADLE_TESTNG_CONFIGURATION_ID | |
# project_id: GRADLE_TESTNG_PROJECT_ID | |
- project_name: jbehave-gradle-junit4 | |
configuration_id: JBEHAVE_GRADLE_JUNIT4_CONFIGURATION_ID | |
project_id: JBEHAVE_GRADLE_JUNIT4_PROJECT_ID | |
# - project_name: jbehave-gradle-testng | |
# configuration_id: JBEHAVE_GRADLE_TESTNG_CONFIGURATION_ID | |
# project_id: JBEHAVE_GRADLE_TESTNG_PROJECT_ID | |
# - project_name: cucumber7-gradle-junit5 | |
# configuration_id: CUCUMBER7_GRADLE_JUNIT5_CONFIGURATION_ID | |
# project_id: CUCUMBER7_GRADLE_JUNIT5_PROJECT_ID | |
# - project_name: jbehave-gradle-junit5 | |
# configuration_id: JBEHAVE_GRADLE_JUNIT5_CONFIGURATION_ID | |
# project_id: JBEHAVE_GRADLE_JUNIT5_PROJECT_ID | |
# - project_name: cucubmer4-gradle-testng | |
# configuration_id: CUCUMBER4_GRADLE_TESTNG_CONFIGURATION_ID | |
# project_id: CUCUMBER4_GRADLE_TESTNG_PROJECT_ID | |
# - project_name: cucubmer5-gradle-testng | |
# configuration_id: CUCUMBER5_GRADLE_TESTNG_CONFIGURATION_ID | |
# project_id: CUCUMBER5_GRADLE_TESTNG_PROJECT_ID | |
# - project_name: cucubmer6-gradle-testng | |
# configuration_id: CUCUMBER6_GRADLE_TESTNG_CONFIGURATION_ID | |
# project_id: CUCUMBER6_GRADLE_TESTNG_PROJECT_ID | |
# - project_name: cucumber4-gradle-junit4 | |
# configuration_id: CUCUMBER4_GRADLE_JUNIT4_CONFIGURATION_ID | |
# project_id: CUCUMBER4_GRADLE_JUNIT4_PROJECT_ID | |
# - project_name: cucumber5-gradle-junit4 | |
# configuration_id: CUCUMBER5_GRADLE_JUNIT4_CONFIGURATION_ID | |
# project_id: CUCUMBER5_GRADLE_JUNIT4_PROJECT_ID | |
# - project_name: cucumber5-gradle-junit5 | |
# configuration_id: CUCUMBER5_GRADLE_JUNIT5_CONFIGURATION_ID | |
# project_id: CUCUMBER5_GRADLE_JUNIT5_PROJECT_ID | |
# - project_name: cucumber6-gradle-junit4 | |
# configuration_id: CUCUMBER6_GRADLE_JUNIT4_CONFIGURATION_ID | |
# project_id: CUCUMBER6_GRADLE_JUNIT4_PROJECT_ID | |
# - project_name: cucumber6-gradle-junit5 | |
# configuration_id: CUCUMBER6_GRADLE_JUNIT5_CONFIGURATION_ID | |
# project_id: CUCUMBER6_GRADLE_JUNIT5_PROJECT_ID | |
# - project_name: selenide-gradle-junit5 | |
# configuration_id: SELENIDE_GRADLE_JUNIT5_CONFIGURATION_ID | |
# project_id: SELENIDE_GRADLE_JUNIT5_PROJECT_ID | |
# - project_name: serenity2-gradle-junit4 | |
# configuration_id: SERENITY2_GRADLE_JUNIT4_CONFIGURATION_ID | |
# project_id: SERENITY2_GRADLE_JUNIT4_PROJECT_ID | |
# - project_name: serenity3-gradle-junit4 | |
# configuration_id: SERENITY3_GRADLE_JUNIT4_CONFIGURATION_ID | |
# project_id: SERENITY3_GRADLE_JUNIT4_PROJECT_ID | |
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-java | |
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 java-examples | |
uses: actions/checkout@v4 | |
with: | |
repository: testit-tms/java-examples | |
path: java-examples | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: ${{ env.JAVA_DISTRIBUTION }} | |
java-package: jdk | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Setup environment | |
run: | | |
./gradlew --no-daemon -DdisableSign=true publishToMavenLocal | |
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 java-examples/${{ matrix.project_name }} | |
chmod +x ./gradlew | |
./gradlew test --no-daemon -DtmsUrl=${{ env.TMS_URL }} -DtmsPrivateToken=${{ env.TMS_PRIVATE_TOKEN }} -DtmsProjectId=${{ env.TMS_PROJECT_ID }} -DtmsConfigurationId=${{ env.TMS_CONFIGURATION_ID }} -DtmsAdapterMode=${{ env.TMS_ADAPTER_MODE }} -DtmsTestRunId=${{ env.TMS_TEST_RUN_ID }} -DtmsCertValidation=${{ env.TMS_CERT_VALIDATION }} || exit 0 | |
- name: Validate | |
run: | | |
dotnet test --configuration Debug --no-build --logger:"console;verbosity=detailed" api-validator-dotnet | |
# test-maven: | |
# name: ${{ matrix.project_name }} | |
# runs-on: ubuntu-latest | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# include: | |
# - project_name: cucumber6-maven-junit4 | |
# configuration_id: CUCUMBER6_MAVEN_JUNIT4_CONFIGURATION_ID | |
# project_id: CUCUMBER6_MAVEN_JUNIT4_PROJECT_ID | |
# - project_id: CUCUMBER6_MAVEN_TESTNG_PROJECT_ID | |
# configuration_id: CUCUMBER6_MAVEN_TESTNG_CONFIGURATION_ID | |
# project_name: cucumber6-maven-testng | |
# - project_name: jbehave-maven-junit4 | |
# configuration_id: JBEHAVE_MAVEN_JUNIT4_CONFIGURATION_ID | |
# project_id: JBEHAVE_MAVEN_JUNIT4_PROJECT_ID | |
# - project_name: jbehave-maven-testng | |
# configuration_id: JBEHAVE_MAVEN_TESTNG_CONFIGURATION_ID | |
# project_id: JBEHAVE_MAVEN_TESTNG_PROJECT_ID | |
# - project_name: maven-junit4 | |
# configuration_id: MAVEN_JUNIT4_CONFIGURATION_ID | |
# project_id: MAVEN_JUNIT4_PROJECT_ID | |
# - project_name: maven-junit5 | |
# configuration_id: MAVEN_JUNIT5_CONFIGURATION_ID | |
# project_id: MAVEN_JUNIT5_PROJECT_ID | |
# - project_name: maven-testng | |
# configuration_id: MAVEN_TESTNG_CONFIGURATION_ID | |
# project_id: MAVEN_TESTNG_PROJECT_ID | |
# # - project_name: jbehave-maven-junit5 | |
# # configuration_id: JBEHAVE_MAVEN_JUNIT5_CONFIGURATION_ID | |
# # project_id: JBEHAVE_MAVEN_JUNIT5_PROJECT_ID | |
# # - project_name: cucumber6-maven-junit5 | |
# # configuration_id: CUCUMBER6_MAVEN_JUNIT5_CONFIGURATION_ID | |
# # project_id: CUCUMBER6_MAVEN_JUNIT5_PROJECT_ID | |
# # - project_name: cucumber4-maven-junit4 | |
# # configuration_id: CUCUMBER4_MAVEN_JUNIT4_CONFIGURATION_ID | |
# # project_id: CUCUMBER4_MAVEN_JUNIT4_PROJECT_ID | |
# # - project_name: cucumber4-maven-testng | |
# # configuration_id: CUCUMBER4_MAVEN_TESTNG_CONFIGURATION_ID | |
# # project_id: CUCUMBER4_MAVEN_TESTNG_PROJECT_ID | |
# # - project_name: cucumber5-maven-junit4 | |
# # configuration_id: CUCUMBER5_MAVEN_JUNIT4_CONFIGURATION_ID | |
# # project_id: CUCUMBER5_MAVEN_JUNIT4_PROJECT_ID | |
# # - project_name: cucumber5-maven-junit5 | |
# # configuration_id: CUCUMBER5_MAVEN_JUNIT5_CONFIGURATION_ID | |
# # project_id: CUCUMBER5_MAVEN_JUNIT5_PROJECT_ID | |
# # - project_name: cucumber5-maven-testng | |
# # configuration_id: CUCUMBER5_MAVEN_TESTNG_CONFIGURATION_ID | |
# # project_id: CUCUMBER5_MAVEN_TESTNG_PROJECT_ID | |
# # - project_name: cucumber7-maven-junit4 | |
# # configuration_id: CUCUMBER7_MAVEN_JUNIT4_CONFIGURATION_ID | |
# # project_id: CUCUMBER7_MAVEN_JUNIT4_PROJECT_ID | |
# # - project_name: cucumber7-maven-junit5 | |
# # configuration_id: CUCUMBER7_MAVEN_JUNIT5_CONFIGURATION_ID | |
# # project_id: CUCUMBER7_MAVEN_JUNIT5_PROJECT_ID | |
# 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-java | |
# 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 java-examples | |
# uses: actions/checkout@v4 | |
# with: | |
# repository: testit-tms/java-examples | |
# path: java-examples | |
# - name: Setup dotnet | |
# uses: actions/setup-dotnet@v4 | |
# with: | |
# dotnet-version: ${{ env.DOTNET_VERSION }} | |
# - name: Setup java | |
# uses: actions/setup-java@v4 | |
# with: | |
# distribution: ${{ env.JAVA_DISTRIBUTION }} | |
# java-package: jdk | |
# java-version: ${{ env.JAVA_VERSION }} | |
# - name: Setup python | |
# uses: actions/setup-python@v5 | |
# with: | |
# python-version: ${{ env.PYTHON_VERSION }} | |
# - name: Setup environment | |
# run: | | |
# ./gradlew --no-daemon -DdisableSign=true publishToMavenLocal | |
# 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 java-examples/${{ matrix.project_name }} | |
# mvn test -DtmsUrl=${{ env.TMS_URL }} -DtmsPrivateToken=${{ env.TMS_PRIVATE_TOKEN }} -DtmsProjectId=${{ env.TMS_PROJECT_ID }} -DtmsConfigurationId=${{ env.TMS_CONFIGURATION_ID }} -DtmsAdapterMode=${{ env.TMS_ADAPTER_MODE }} -DtmsTestRunId=${{ env.TMS_TEST_RUN_ID }} -DtmsCertValidation=${{ env.TMS_CERT_VALIDATION }} || exit 0 | |
# - name: Validate | |
# run: | | |
# dotnet test --configuration Debug --no-build --logger:"console;verbosity=detailed" api-validator-dotnet |