Correct workflow test

This commit is contained in:
Reginald Bondoc
2022-12-20 01:13:13 +01:00
parent bd207dc65f
commit 113ec55681
2 changed files with 19 additions and 18 deletions
+9 -9
View File
@@ -1,8 +1,8 @@
name: 'Backend Test Report' name: "Backend Test Report"
on: on:
workflow_run: workflow_run:
workflows: ['Check Backend Pull Request'] workflows: ["Check Backend Pull Request"]
types: types:
- completed - completed
@@ -12,19 +12,19 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: dorny/test-reporter@v1 - name: 📁 Download test results
uses: actions/download-artifact@v3
with: with:
path: '*.xml' # Path to test results (inside artifact .zip) name: be-test-results
reporter: jest-junit # Format of test results - name: 📋 Publish test results
- name: 📄 Publish test results
uses: dorny/test-reporter@v1 uses: dorny/test-reporter@v1
with: with:
name: Test Results name: Test Results
artifact: be-test-results
path: reports/jest-*.xml path: reports/jest-*.xml
reporter: jest-junit reporter: jest-junit
- uses: ArtiomTr/jest-coverage-report-action@v2 - name: 📋 Publish coverage
uses: ArtiomTr/jest-coverage-report-action@v2
id: coverage id: coverage
with: with:
output: report-markdown output: report-markdown
coverage-file: backend/coverage/report.json coverage-file: coverage/report.json
+10 -9
View File
@@ -1,13 +1,14 @@
name: 'Check Backend Pull Request' name: "Check Backend Pull Request"
on: on:
workflow_dispatch: # remove me
pull_request: pull_request:
types: [opened, synchronize] types: [opened, synchronize]
paths: paths:
- 'backend/**' - "backend/**"
- '!backend/README.md' - "!backend/README.md"
- '!backend/.*' - "!backend/.*"
- 'backend/.eslintrc.js' - "backend/.eslintrc.js"
jobs: jobs:
check-be-pr: check-be-pr:
@@ -20,8 +21,8 @@ jobs:
- name: 🔧 Setup Node 16 - name: 🔧 Setup Node 16
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: '16' node-version: "16"
cache: 'npm' cache: "npm"
cache-dependency-path: backend/package-lock.json cache-dependency-path: backend/package-lock.json
- name: 📦 Install dependencies - name: 📦 Install dependencies
run: npm ci --only-production --ignore-scripts run: npm ci --only-production --ignore-scripts
@@ -35,8 +36,8 @@ jobs:
with: with:
name: be-test-results name: be-test-results
path: | path: |
backend/reports ./backend/reports
backend/coverage ./backend/coverage
- name: 🏗️ Run build - name: 🏗️ Run build
run: npm run build run: npm run build
working-directory: backend working-directory: backend