-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #378 from AmpersandTarski/feature/Specflow-test-pi…
…peline Added specflow tests to pipeline
- Loading branch information
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.