Skip to content

TUnit Only External #1174

TUnit Only External

TUnit Only External #1174

name: TUnit Only External
on:
schedule:
# Runs at 02:00, 08:00, 14:00, 20:00 UTC daily (4× per day)
- cron: "0 2,8,14,20 * * *"
push:
paths:
- '.github/workflows/tunit-pipeline-external.yml'
- '.github/actions/**'
- 'ExternalMerlin.TUnit/**'
- 'ExternalMerlin.TUnit.RealDevices/**'
branches:
- master
- 'releases/**'
- 'feat/**'
- 'feature/**'
- 'fix/**'
- 'test/**'
- 'bug/**'
workflow_dispatch:
env:
PROJECT_NAME: Saucery
SOLN_FILE: Saucery.slnx
EM_TUNIT_PROJECT: ExternalMerlin.TUnit/ExternalMerlin.TUnit.csproj
EM_RD_TUNIT_PROJECT: ExternalMerlin.TUnit.RealDevices/ExternalMerlin.TUnit.RealDevices.csproj
CONFIG: Release
WATCHED_GLOBS: |
.github/workflows/tunit-pipeline-external.yml
.github/actions/**
ExternalMerlin.TUnit/**
ExternalMerlin.TUnit.RealDevices/**
permissions:
contents: read
jobs:
detect-changes:
name: Detect watched path changes since last completed run
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
outputs:
changed: ${{ steps.detect.outputs.changed }}
previous_sha: ${{ steps.detect.outputs.previous_sha }}
paths_changed: ${{ steps.detect.outputs.paths_changed }}
steps:
- uses: actions/checkout@v7
- id: detect
uses: ./.github/actions/detect-watched-paths
with:
workflow-id: .github/workflows/tunit-pipeline-external.yml
watched-globs: ${{ env.WATCHED_GLOBS }}
github-token: ${{ secrets.GITHUB_TOKEN }}
tunit-external-tests:
needs: detect-changes
if: needs.detect-changes.outputs.paths_changed == 'true'
runs-on: ubuntu-latest
env:
SAUCE_USER_NAME: ${{ secrets.SAUCE_USER_NAME }}
SAUCE_API_KEY: ${{ secrets.SAUCE_API_KEY }}
SAUCERY_TEST_FRAMEWORK: TUnit
steps:
- name: Checkout Code
uses: actions/checkout@v7
- uses: ./.github/actions/setup-dotnet
- name: Compile solution
run: dotnet build -c ${{ env.CONFIG }}
- name: Run External TUnit Integration Tests
run: dotnet run -c ${{ env.CONFIG }} --project ${{ env.EM_TUNIT_PROJECT }} --no-build
tunit-real-external-tests:
needs: detect-changes
if: needs.detect-changes.outputs.paths_changed == 'true'
runs-on: ubuntu-latest
env:
SAUCE_USER_NAME: ${{ secrets.SAUCE_USER_NAME }}
SAUCE_API_KEY: ${{ secrets.SAUCE_API_KEY }}
SAUCERY_TEST_FRAMEWORK: TUnit
steps:
- name: Checkout Code
uses: actions/checkout@v7
- uses: ./.github/actions/setup-dotnet
- name: Compile solution
run: dotnet build -c ${{ env.CONFIG }}
- name: Run External TUnit Real Integration Tests
run: dotnet run -c ${{ env.CONFIG }} --project ${{ env.EM_RD_TUNIT_PROJECT }} --no-build