Skip to content

demanguillaume is creating a pull request #41

demanguillaume is creating a pull request

demanguillaume is creating a pull request #41

Workflow file for this run

name: Build the app and run tests
run-name: ${{ github.actor }} is creating a pull request
on: [pull_request, push]
permissions:
contents: read
checks: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Run tests and generate report
run: |
npm test
continue-on-error: false
- name: Upload test reports
if: always()
uses: actions/upload-artifact@v3
with:
name: test-reports
path: |
./test-report.html
./reports/junit/js-test-results.xml
- name: Notify Discord on failure
if: failure()
uses: containrrr/shoutrrr-action@v1
with:
url: ${{ secrets.NOTIFICATION_URL }}
title: "Build failed for ${{ github.actor }}"
message: |
Build failed or tests did not pass
Pull request: ${{ github.event.pull_request.html_url }}
test-report:
runs-on: ubuntu-latest
needs: build
if: always()
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download test reports
uses: actions/download-artifact@v3
with:
name: test-reports
- name: Publish test results
uses: dorny/test-reporter@v1
with:
name: Jest tests
path: ./reports/junit/js-test-results.xml
reporter: jest-junit