Skip to content

adding test report instead of github pages #54

adding test report instead of github pages

adding test report instead of github pages #54

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Run API test and publish report
on:
push:
branches: [ main ]
jobs:
Regression:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Checkout git project
uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag api-node-image:latest
- name: Run api test in docker
run: docker run --env USER_TOKEN=${{ secrets.GO_RES_USER_TOKEN }} --volume "${pwd}"/report:/app/report/ api-node-image:latest
- name: Upload report artifact
uses: actions/upload-artifact@v3
if: always()
with:
name: MochawesomeReport
path: /report
# - name: Configure GitHub Pages
# uses: actions/configure-pages@v4.0.0
# if: always()
# - name: Upload GitHub Pages Report
# uses: actions/upload-pages-artifact@v3.0.1
# if: always()
# with:
# path: /report
# retention-days: 30
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4.0.5
# if: always()
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: API Test Report
path: report/index-*.json
reporter: mocha-json