Skip to content

chore: add TypeScript watch alongside build and API tasks #131

chore: add TypeScript watch alongside build and API tasks

chore: add TypeScript watch alongside build and API tasks #131

Workflow file for this run

name: Continuous Integration
on: push
jobs:
# Based on https://github.com/pnpm/action-setup
specs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run unitary tests
run: pnpm test
- name: Set environment variables for E2E tests
run: |
echo "API_BASE_URL=http://localhost:8080" >> $GITHUB_ENV
echo "API_HTTP_HOST=127.0.0.1" >> $GITHUB_ENV
echo "API_HTTP_PORT=8080" >> $GITHUB_ENV
echo "API_HTTP_SCHEME=http" >> $GITHUB_ENV
echo "DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres" >> $GITHUB_ENV
- name: Run E2E tests
run: pnpm test:e2e