Skip to content

Get OAuth running in local devcontainer #47

Get OAuth running in local devcontainer

Get OAuth running in local devcontainer #47

Workflow file for this run

name: Node.js CI
on:
push:
branches:
- "*"
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Check out source code
uses: actions/checkout@v3
- name: Set up appropriate Node version
uses: actions/setup-node@v3
with:
cache: "npm"
node-version-file: ".nvmrc"
- name: Start dev service containers
run: docker compose up --detach
- name: Install dependencies
run: npm ci
- name: Set up environment
run: cp .env.example .env
- name: Apply database migrations
run: npm run migration -- up
- name: Check code style
run: npm run lint
- name: Run low-level tests
run: npm run test -- --coverage
env:
FORCE_COLOR: true
- name: Run end-to-end tests
run: npm run e2e
env:
CYPRESS_VIDEO: true
- name: Get service logs and stop containers
if: always()
run: |
docker compose logs
docker compose down
- name: Store Cypress test outputs
if: always()
uses: actions/upload-artifact@v3
with:
if-no-files-found: ignore
name: cypress-outputs
path: |
e2e/screenshots/
e2e/videos/
deploy:
uses: "./.github/workflows/deploy.yml"
if: github.ref == 'refs/heads/main'
needs: build
with:
environment: heroku
secrets:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_EMAIL: ${{ secrets.HEROKU_EMAIL }}