Skip to content

Merge pull request #1 from Waydriver/miguel-add-docs #42

Merge pull request #1 from Waydriver/miguel-add-docs

Merge pull request #1 from Waydriver/miguel-add-docs #42

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Test and lint
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
env:
PORT: 3000
IP: localhost
ACCESS_TOKEN_SECRET: "Not really a secret it's just CI"
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'npm'
- run: npm ci
# Start the server, runs tests, then kill the background job (hopefully)
# At the very least, it'll die once the workflow ends
- name: npm test
run: npm run dev & (sleep 3 && npm test && (jobs -p | xargs -I{} kill -- -{}))
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'npm'
- run: npm ci
- run: npm run lint
typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'npm'
- run: npm ci
- run: npm run tsc