Skip to content

Merge pull request #239 from faasjs/dependabot/npm_and_yarn/faasjs/an… #519

Merge pull request #239 from faasjs/dependabot/npm_and_yarn/faasjs/an…

Merge pull request #239 from faasjs/dependabot/npm_and_yarn/faasjs/an… #519

Workflow file for this run

name: Unit Test
on:
workflow_dispatch:
push:
branches:
- main
paths:
- packages/**
- .github/workflows/unit-test.yml
- package-lock.json
pull_request:
paths:
- packages/**
- package-lock.json
jobs:
unit-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:alpine
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
redis:
image: redis:alpine
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Install
run: |
npm install -g npm@latest
npm install
- name: Lint
run: npm run lint
- name: Run Tests
run: npm run ci
env:
KNEX_CONNECTION_BASE: postgresql://postgres:postgres@localhost:5432
REDIS_CONNECTION_BASE: redis://localhost:6379
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOVTOKEN }}