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

feat: Adds allure test report #275

Merged
merged 50 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
aeb2634
feat: add workflow for test report generation
kukkok3 Feb 22, 2024
fb8b779
fix: earthly path
kukkok3 Feb 22, 2024
ba8cefc
fix: earthly
kukkok3 Feb 22, 2024
55ce1e0
feat: add ci setup
kukkok3 Feb 22, 2024
966966d
test run
kukkok3 Feb 22, 2024
1be531b
feat: add allure folder
kukkok3 Feb 22, 2024
161c7f7
feat: add allure report action
kukkok3 Feb 22, 2024
fa4d39b
test run
kukkok3 Feb 22, 2024
93cea80
feat: adds action to generate test report
kukkok3 Feb 29, 2024
97ecf50
fix: delete unneeded folder
kukkok3 Feb 29, 2024
e18b6fa
fix(cspell): add words to dict
kukkok3 Feb 29, 2024
2f7ea9c
fix(cspell): add words to dict
kukkok3 Feb 29, 2024
1f2c24d
feat: adds fuzzer api
kukkok3 Feb 29, 2024
28a040c
fix: report name
kukkok3 Feb 29, 2024
c50c8b1
fix: adds --allow-privileged
kukkok3 Feb 29, 2024
1bdea94
Merge branch 'main' into feat/test-report
kukkok3 Feb 29, 2024
f7f8c77
fix: token permission
kukkok3 Feb 29, 2024
0b0b403
Merge branch 'main' into feat/test-report
minikin Mar 1, 2024
41750b9
test: add failures
kukkok3 Mar 4, 2024
79b7d95
feat: split test reporting steps in different jobs
kukkok3 Mar 4, 2024
c54750a
fix: adds always to upload steps
kukkok3 Mar 4, 2024
183edf4
test run
kukkok3 Mar 4, 2024
2d05dc0
test run
kukkok3 Mar 4, 2024
04ffee3
test run
kukkok3 Mar 4, 2024
899273f
test run
kukkok3 Mar 4, 2024
f60ef1c
test: remove one job
kukkok3 Mar 4, 2024
ddeef8c
test run
kukkok3 Mar 4, 2024
7e7aedc
feat: add schemathesis step back
kukkok3 Mar 4, 2024
bc358fd
fix: add always
kukkok3 Mar 4, 2024
9634b16
feat: remove test faliure
kukkok3 Mar 4, 2024
67be847
test run
kukkok3 Mar 4, 2024
3963c22
test run
kukkok3 Mar 4, 2024
1356ffe
test run
kukkok3 Mar 4, 2024
31441b2
test run
kukkok3 Mar 4, 2024
4432704
test run
kukkok3 Mar 4, 2024
49eda00
test run
kukkok3 Mar 4, 2024
c445792
fix path
kukkok3 Mar 4, 2024
9b59679
feat: adds pattern for junit files
kukkok3 Mar 4, 2024
7568c88
feat: adds continue on error
kukkok3 Mar 4, 2024
196ac48
feat: search for wildcard
kukkok3 Mar 4, 2024
eac6f93
feat: switch to globstar
kukkok3 Mar 4, 2024
fd6df84
feat: adds file ext env var
kukkok3 Mar 4, 2024
39dcf4b
test run
kukkok3 Mar 4, 2024
4a0e272
clean up
kukkok3 Mar 4, 2024
4960a84
fix: fmt
kukkok3 Mar 4, 2024
16566c1
restore test failure
kukkok3 Mar 4, 2024
575296b
feat: clean up and fix deps errors
kukkok3 Mar 5, 2024
aea6f93
feat(docs): adds link to latest report
kukkok3 Mar 5, 2024
2009da4
fix(docs): update text
kukkok3 Mar 5, 2024
46a9e58
fix: markdown
kukkok3 Mar 5, 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
30 changes: 9 additions & 21 deletions .config/dictionaries/project.dic
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ adminer
afinet
androidx
appspot
Arbritrary
asyncio
asyncpg
auditability
Expand Down Expand Up @@ -35,13 +36,15 @@ dotenvy
dotglob
drep
dreps
earthfile
encryptor
fetchval
fmtchk
fmtfix
fontawesome
formz
Formz
fuzzer
gapless
gcloud
genhtml
Expand All @@ -52,6 +55,7 @@ ideascale
idents
integ
Intellij
iohk
iphoneos
jetbrains
Joaquín
Expand All @@ -65,6 +69,8 @@ lintfix
localizable
loguru
mdlint
mgrybyk
mithril
mitigations
moderations
multidex
Expand All @@ -73,7 +79,6 @@ nanos
netifas
netkey
nextest
nextest
Oleksandr
oneshot
openapi
Expand Down Expand Up @@ -118,13 +123,16 @@ testcov
testdocs
testunit
thiserror
thollander
timelike
Traceback
TXNZD
unmanaged
UTXO
vitss
voteplan
voteplans
wallclock
xcconfig
xcfilelist
xcodebuild
Expand All @@ -133,23 +141,3 @@ xctest
xctestrun
xcworkspace
yoroi
idents
rustflags
rustdoc
rustdocflags
codegen
lintfix
testunit
nextest
testcov
testdocs
fmtchk
fmtfix
gethostname
afinet
netifas
UTXO
mithril
Arbritrary
iohk
wallclock
115 changes: 115 additions & 0 deletions .github/workflows/generate-allure-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Allure Report Generation

on:
pull_request:
push:
branches: 'main'

permissions:
contents: write
pull-requests: write
id-token: write

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

env:
AWS_REGION: eu-central-1
AWS_ROLE_ARN: arn:aws:iam::332405224602:role/ci
EARTHLY_TARGET: docker
ECR_REGISTRY: 332405224602.dkr.ecr.eu-central-1.amazonaws.com
ALLURE_REPORT_PATH: allure-report
REPORT_EXT: .junit-report.xml

jobs:
generate-test-reports:
name: Generate test reports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup CI
uses: input-output-hk/catalyst-ci/actions/setup@master
with:
aws_role_arn: ${{ env.AWS_ROLE_ARN }}
aws_region: ${{ env.AWS_REGION }}
earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }}

- name: Get unit test report
uses: input-output-hk/catalyst-ci/actions/run@master
if: always()
continue-on-error: true
with:
earthfile: ./catalyst-gateway/
flags:
targets: build
target_flags:
runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
artifact: "false"

- name: Get schemathesis test report
uses: input-output-hk/catalyst-ci/actions/run@master
if: always()
continue-on-error: true
with:
earthfile: ./catalyst-gateway/tests/
flags: --allow-privileged
targets: test-fuzzer-api
target_flags:
runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
artifact: "false"

- name: Collect and upload test reports
uses: actions/upload-artifact@v4
if: always()
with:
path: '**/*${{ env.REPORT_EXT }}'
if-no-files-found: error
retention-days: 1

generate-allure-report:
name: Generate allure report
runs-on: ubuntu-latest
needs: [generate-test-reports]
steps:
- uses: actions/checkout@v3

- uses: actions/download-artifact@v4

- name: Setup Allure report
run: |
mkdir -p ${{ env.ALLURE_REPORT_PATH }}
shopt -s globstar
cp **/*${{ env.REPORT_EXT }} ${{ env.ALLURE_REPORT_PATH }}
ls ${{ env.ALLURE_REPORT_PATH }}

- name: Checkout gh-pages
uses: actions/checkout@v3
with:
ref: gh-pages
path: gh-pages-dir

- name: Build Allure report
uses: mgrybyk/allure-report-branch-action@v1
id: allure
with:
report_id: 'test-report'
gh_pages: 'gh-pages-dir'
report_dir: ${{ env.ALLURE_REPORT_PATH }}

- name: Git push to gh-pages
uses: mgrybyk/git-commit-pull-push-action@v1
with:
repository: gh-pages-dir
branch: gh-pages
pull_args: --rebase -X ours

- name: Comment PR with Allure report link
if: ${{ always() && github.event_name == 'pull_request' && steps.allure.outputs.report_url }}
uses: thollander/actions-comment-pull-request@v2
with:
message: |
${{ steps.allure.outputs.test_result_icon }} [Test Report](${{ steps.allure.outputs.report_url }}) | ${\color{lightgreen}Pass: ${{ steps.allure.outputs.test_result_passed }}/${{ steps.allure.outputs.test_result_total }}}$ | ${\color{red}Fail: ${{ steps.allure.outputs.test_result_failed }}/${{ steps.allure.outputs.test_result_total }}}$ |
comment_tag: allure_report
mode: upsert
17 changes: 12 additions & 5 deletions catalyst-gateway/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion catalyst-gateway/tests/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test-fuzzer-api:
docker cp st:/results/junit-report.xml junit-report.xml
END
WAIT
SAVE ARTIFACT junit-report.xml AS LOCAL junit-report.xml
SAVE ARTIFACT junit-report.xml AS LOCAL schemathesis.junit-report.xml
SAVE ARTIFACT cat-gateway.log AS LOCAL cat-gateway.log
END
IF [ -f fail ]
Expand Down
4 changes: 4 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ icon: material/chat

* [MkDocs](https://www.mkdocs.org)
* [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/)

## Test reports

* [Main test report](https://input-output-hk.github.io/catalyst-voices/allure-action/main/test-report/latest.html)
Loading