mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-21 22:58:10 +00:00
53 lines
1014 B
YAML
53 lines
1014 B
YAML
name: test
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
checks: write
|
|
|
|
jobs:
|
|
test:
|
|
name: test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: 'false'
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20.12.0'
|
|
|
|
- name: Build Packages
|
|
run: |
|
|
corepack enable
|
|
yarn install --immutable
|
|
yarn build
|
|
shell: bash
|
|
|
|
- name: Test
|
|
run: |
|
|
yarn test
|
|
shell: bash
|
|
|
|
- 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
|
|
|
|
- name: Upload Coverage Reports to Codecov
|
|
uses: codecov/codecov-action@v3
|