Skip to content

NUnit Only External #1125

NUnit Only External

NUnit Only External #1125

name: NUnit Only External
on:
schedule:
- cron: "0 2,8,14,20 * * *"
push:
paths:
- ".github/workflows/nunit-pipeline-external.yml"
- ".github/actions/**"
- "ExternalMerlin.NUnit/**"
- "ExternalMerlin.NUnit.RealDevices/**"
branches:
- master
- "releases/**"
- "feat/**"
- "feature/**"
- "fix/**"
- "test/**"
- "bug/**"
workflow_dispatch:
env:
PROJECT_NAME: Saucery
SOLN_FILE: Saucery.slnx
EM_NUNIT_PROJECT: ExternalMerlin.NUnit/ExternalMerlin.NUnit.csproj
EM_RD_NUNIT_PROJECT: ExternalMerlin.NUnit.RealDevices/ExternalMerlin.NUnit.RealDevices.csproj
CONFIG: Release
WATCHED_GLOBS: |
.github/workflows/nunit-pipeline-external.yml
.github/actions/**
ExternalMerlin.NUnit/**
ExternalMerlin.NUnit.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/nunit-pipeline-external.yml
watched-globs: ${{ env.WATCHED_GLOBS }}
github-token: ${{ secrets.GITHUB_TOKEN }}
nunit-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: NUnit
steps:
- name: Checkout Code
uses: actions/checkout@v7
with:
fetch-depth: 1
- uses: ./.github/actions/setup-dotnet
- name: Compile solution
run: dotnet build -c ${{ env.CONFIG }}
- name: Run External NUnit Integration Tests
run: dotnet test -c ${{ env.CONFIG }} ${{ env.EM_NUNIT_PROJECT }}
nunit-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: NUnit
steps:
- name: Checkout Code
uses: actions/checkout@v7
with:
fetch-depth: 1
- uses: ./.github/actions/setup-dotnet
- name: Compile solution
run: dotnet build -c ${{ env.CONFIG }}
- name: Run External NUnit Real Integration Tests
run: dotnet test -c ${{ env.CONFIG }} ${{ env.EM_RD_NUNIT_PROJECT }}