diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3327cd4..4ecd575 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,15 +2,12 @@ name: CI -# Controls when the workflow will run on: - # Triggers the workflow on push or pull request events but only for the main branch push: - branches: [ master ] + branches: [main] pull_request: - branches: [ master ] + branches: [main] - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel @@ -31,11 +28,16 @@ jobs: # Runs a set of commands using the runners shell - name: Test - run: npm run test-jenkins + uses: mattallty/jest-github-action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + test-command: 'npm run coverage-jenkins' # Upload test results - - uses: actions/upload-artifact@v2 - if: success() || failure() # run this step even if previous step failed + - uses: actions/upload-artifact@v4 + if: sucess() || failure() with: name: test-results - path: ./coverage/test.results.xml \ No newline at end of file + path: | + ./coverage/