-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (58 loc) · 2.21 KB
/
Specflow-tests.yml
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
name: Specflow tests
on:
pull_request:
branches: ["main"]
jobs:
Build_Docker:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
# - name: Build docker
# id: update-image
# shell: bash
# run: |
# cd ./RAP4
# docker build -t ampersandtarski/ampersand-rap:dev-latest .
# cd ..
# cp .example.env .env
# docker compose build
# docker network create proxy
# docker network create rap_db
# docker compose up -d
- name: Navigate to test project
id: navigate-to-test-project
shell: bash
run: |
cd ./Testing/SpecFlow/SpecFlowRAP/SpecFlowCalculator.Specs
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: "6.0.x"
- name: BuildDotnetApp
shell: bash
run: |
dotnet build ./Testing/SpecFlow/SpecFlowRAP/SpecFlowCalculator.Specs/SpecFlowRAP.Specs.csproj -c Release -v minimal -f net6.0
- name: Run SpecFlow tests
shell: bash
continue-on-error: true
run: |
dotnet test ./Testing/SpecFlow/SpecFlowRAP/SpecFlowCalculator.Specs/SpecFlowRAP.Specs.csproj --no-build -c Release -v minimal -f net6.0
- name: Create living spec doc
shell: bash
run: |
dotnet tool install --global SpecFlow.Plus.LivingDoc.CLI
livingdoc test-assembly Testing/SpecFlow/SpecFlowRAP/SpecFlowCalculator.Specs/bin/Release/net6.0/SpecFlowRAP.Specs.dll -t Testing/SpecFlow/SpecFlowRAP/SpecFlowCalculator.Specs/bin/Release/net6.0/TestExecution.json -o Testing/SpecFlow/Results/TestResult.html
- name: Publish Specflow Test Results
id: publish-specflow-test-results
uses: actions/upload-artifact@v4
with:
name: "Specflow Test Results"
path: Testing/SpecFlow/Results/TestResult.html
- name: Add artifact to pull request
uses: mshick/add-pr-comment@v2
with:
message: |
Click here to download Specflow test results: ${{ steps.publish-specflow-test-results.outputs.artifact-url }}