Skip to content

XUnit3 Only External #1112

XUnit3 Only External

XUnit3 Only External #1112

name: XUnit3 Only External
on:
schedule:
- cron: "0 2,8,14,20 * * *"
push:
paths:
- ".github/workflows/xunit3-pipeline-external.yml"
- ".github/actions/**"
- "ExternalMerlin.XUnit3/**"
- "ExternalMerlin.XUnit3.RealDevices/**"
branches:
- master
- "releases/**"
- "feat/**"
- "feature/**"
- "fix/**"
- "test/**"
workflow_dispatch:
env:
PROJECT_NAME: Saucery
SOLN_FILE: Saucery.slnx
EM_XUNIT3_PROJECT: ExternalMerlin.XUnit3/ExternalMerlin.XUnit3.csproj
EM_RD_XUNIT3_PROJECT: ExternalMerlin.XUnit3.RealDevices/ExternalMerlin.XUnit3.RealDevices.csproj
CONFIG: Release
WATCHED_GLOBS: |
.github/workflows/xunit3-pipeline-external.yml
.github/actions/**
ExternalMerlin.XUnit3/**
ExternalMerlin.XUnit3.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/xunit3-pipeline-external.yml
watched-globs: ${{ env.WATCHED_GLOBS }}
github-token: ${{ secrets.GITHUB_TOKEN }}
xunit3-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: XUnit3
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 XUnit3 Integration Tests
run: dotnet run -c ${{ env.CONFIG }} --project ${{ env.EM_XUNIT3_PROJECT }} --no-build
xunit3-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: XUnit3
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 XUnit3 Real Integration Tests
run: dotnet run -c ${{ env.CONFIG }} --project ${{ env.EM_RD_XUNIT3_PROJECT }} --no-build