50 lines
1.3 KiB
YAML
Raw Normal View History

name: Unit Tests
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
2022-10-10 20:13:50 +08:00
node-version: [18.x]
steps:
2022-09-05 01:00:47 +05:30
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
# uses version from "packageManager" field in package.json
2022-09-05 01:00:47 +05:30
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
cache: pnpm
2022-09-05 01:00:47 +05:30
node-version: ${{ matrix.node-version }}
2022-09-05 01:00:47 +05:30
- name: Install Packages
run: |
pnpm install --frozen-lockfile
2022-09-05 01:00:47 +05:30
env:
CYPRESS_CACHE_FOLDER: .cache/Cypress
2022-09-05 01:00:47 +05:30
- name: Run Unit Tests
run: |
pnpm run ci --coverage
- name: Run ganttDb tests using California timezone
env:
# Makes sure that gantt db works even in a timezone that has daylight savings
# since some days have 25 hours instead of 24.
TZ: America/Los_Angeles
run: |
pnpm exec vitest run ./packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts
2023-06-13 12:23:41 +05:30
# Coveralls is throwing 500. Disabled for now.
# - name: Upload Coverage to Coveralls
# uses: coverallsapp/github-action@v2
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# flag-name: unit