-
Notifications
You must be signed in to change notification settings - Fork 4
88 lines (82 loc) · 2.73 KB
/
Copy pathxunit3-pipeline-external.yml
File metadata and controls
88 lines (82 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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