chronocat/.github/workflows/test.yml

53 lines
1014 B
YAML
Raw Permalink Normal View History

2024-03-13 14:20:55 +00:00
name: test
on:
push:
pull_request:
workflow_dispatch:
2024-04-05 19:11:22 +00:00
permissions:
contents: read
actions: read
checks: write
2024-03-13 14:20:55 +00:00
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
2024-03-13 14:51:17 +00:00
uses: actions/checkout@v4
2024-03-13 14:20:55 +00:00
with:
submodules: 'false'
fetch-depth: 0
- name: Setup Node.js
2024-03-13 14:51:17 +00:00
uses: actions/setup-node@v4
2024-03-13 14:20:55 +00:00
with:
2024-04-05 19:11:22 +00:00
node-version: '20.12.0'
2024-03-13 14:20:55 +00:00
2024-04-05 19:11:22 +00:00
- name: Build Packages
2024-03-13 14:20:55 +00:00
run: |
2024-03-13 14:51:17 +00:00
corepack enable
yarn install --immutable
2024-03-13 14:20:55 +00:00
yarn build
2024-04-05 19:11:22 +00:00
shell: bash
- name: Test
run: |
2024-03-13 14:20:55 +00:00
yarn test
shell: bash
2024-04-05 19:11:22 +00:00
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Chronocat Unit Tests
path: coverage/jest-junit.xml # Path to test results
reporter: jest-junit # Format of test results
2024-03-13 14:20:55 +00:00
- name: Upload Coverage Reports to Codecov
uses: codecov/codecov-action@v3