Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added specflow tests to pipeline #378

Merged
merged 38 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bd52212
Setup started for specflowtest pipeline
lucsomers101 Jul 17, 2024
58b2158
added trigger for branch push
lucsomers101 Jul 17, 2024
ea59ef8
moved pd and added echo
lucsomers101 Jul 17, 2024
c4e2d23
Moved cwd
lucsomers101 Jul 17, 2024
944ba3c
removed echo
lucsomers101 Jul 17, 2024
4f1d4e1
removed multiline
lucsomers101 Jul 17, 2024
721fd2c
added checkout
lucsomers101 Jul 17, 2024
843e05d
added commands back to run
lucsomers101 Jul 17, 2024
305165d
added moving to rap4 dir
lucsomers101 Jul 17, 2024
5dfa418
changed chd to cd
lucsomers101 Jul 17, 2024
9a07d6b
captialized rap
lucsomers101 Jul 17, 2024
852e5c7
added docker build
lucsomers101 Jul 17, 2024
5b52197
added docker and test run steps
lucsomers101 Jul 17, 2024
dd0a076
added build and run for specflow tests
lucsomers101 Jul 17, 2024
497cbb2
Commented old specflow test call
lucsomers101 Jul 17, 2024
6aa3dfc
added navigate to solution step
lucsomers101 Jul 17, 2024
9ca89c6
setup dotnet step added
lucsomers101 Jul 17, 2024
24347d9
changed dotnet version from 7 to 6
lucsomers101 Jul 17, 2024
9c917b2
added file navigate step to csproj file
lucsomers101 Jul 17, 2024
9ceaa02
Changed dotnet build to hard coded command
lucsomers101 Jul 17, 2024
3f2877d
testing file path for build step
lucsomers101 Jul 17, 2024
206b5de
added full path
lucsomers101 Jul 17, 2024
fdeb37a
updated path
lucsomers101 Jul 17, 2024
426493a
rewrote dotnet test
lucsomers101 Jul 17, 2024
0e538b8
added the docker setup back to file
lucsomers101 Jul 17, 2024
61c5955
Added generation of docs step
lucsomers101 Jul 17, 2024
b4e0d49
commented docker setup
lucsomers101 Jul 17, 2024
29b05df
added trigger for specflow test
lucsomers101 Jul 17, 2024
cf86090
update to gitignore
lucsomers101 Jul 17, 2024
5f6ea46
added pr comment step and commented docker
lucsomers101 Jul 17, 2024
ee7fdd7
added outputs to artifact comment
lucsomers101 Jul 17, 2024
fe58e2b
uncommented docker step
lucsomers101 Jul 17, 2024
7a6c13f
reverted commit
lucsomers101 Jul 19, 2024
ed470d3
Update .gitignore
lucsomers101 Aug 1, 2024
93ba8b4
Revert dll files added
lucsomers101 Aug 1, 2024
3ce641c
Remove dlls
lucsomers101 Aug 1, 2024
51188d4
Merge pull request #379 from AmpersandTarski/feature/Fixing-dlls-polu…
lucsomers101 Aug 1, 2024
a78b4b3
Delete Testing/SpecFlow/SpecFlowRAP/SpecFlowCalculator.Specs/bin/Rele…
lucsomers101 Aug 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/Specflow-tests.yml
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 }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ Testing/Gatling/results
Testing/Gatling/src/test/results
Testing/Gatling/src/test/resources/recorder.conf

Testing/SpecFlow/SpecFlowRAP/.vs
Testing/SpecFlow/SpecFlowRAP/SpecFlowCalculator.Specs/bin/
Testing/SpecFlow/SpecFlowRAP/SpecFlowCalculator.Specs/obj/
Testing/SpecFlow/SpecFlowRAP/SpecFlowCalculator.Specs/Features/*.feature.cs

gatling-3-7-2/
Loading