Skip to content

generate report even if test fails #46

generate report even if test fails

generate report even if test fails #46

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
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: Deploy report to GitHub Page
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# PUBLISH_BRANCH: gh-pages
# PUBLISH_DIR: ./report