Skip to content

Update main.yml

Update main.yml #3

Workflow file for this run

name: merge-coverage-unit-e2e-shard
on:
workflow_dispatch:
push:
branches: ["main"]
permissions:
contents: read
pages: write
id-token: write
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- run: npm i
- run: npm run test:unit
env:
FORCE_COLOR: true
- uses: actions/upload-artifact@v4
if: always()
with:
name: unit-test
path: coverage-reports/unit
retention-days: 7
e2e-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- run: npm i
- run: npx playwright install --with-deps
- run: npm run test:e2e
env:
FORCE_COLOR: true
- uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-test
path: coverage-reports/e2e
retention-days: 7
merge-coverage:
name: merge-coverage
runs-on: ubuntu-latest
needs: [unit-test, e2e-test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download unit coverage
uses: actions/download-artifact@v4
with:
name: unit-test
path: coverage-reports/unit
- name: Download e2e coverage
uses: actions/download-artifact@v4
with:
name: e2e-test
path: coverage-reports/e2e
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- run: npm i
- run: npm run test:merge
env:
FORCE_COLOR: true