40 lines
776 B
YAML
Raw Normal View History

2024-11-01 15:07:30 +01:00
name: Unit Tests
on:
push:
2024-11-01 15:10:43 +01:00
branches:
- "**"
2024-11-01 15:07:30 +01:00
pull_request:
2024-11-01 15:10:43 +01:00
branches:
- "**"
2024-11-01 15:07:30 +01:00
workflow_dispatch:
env:
VITE_CODEX_API_URL: ${{ secrets.VITE_CODEX_API_URL }}
VITE_GEO_IP_URL: ${{ secrets.VITE_GEO_IP_URL }}
jobs:
tests:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: Install dependencies
2024-11-01 15:10:43 +01:00
run: sudo apt update
2024-11-01 15:07:30 +01:00
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/cache@v4
id: npm-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npm run test:unit