Skip to content

Cleanup

Cleanup #824

Workflow file for this run

# SPDX-License-Identifier: AGPL-3.0-or-later
# SPDX-FileCopyrightText: 2021 Moritz Hedtke <[email protected]>
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Tests Calculate
on:
merge_group:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test-calculate:
runs-on: ubuntu-latest
services:
projektwahl:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_USER: projektwahl
POSTGRES_DB: projektwahl
POSTGRES_PASSWORD: projektwahl
#options: >-
# --health-cmd pg_isready
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
strategy:
matrix:
node-version: [19.x]
steps:
- run: sudo apt-get update && sudo apt-get install -y glpk-utils
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: NODE_ENV=testing DATABASE_URL=postgres://projektwahl:projektwahl@localhost/projektwahl BASE_URL=https://localhost:8443 npm run test-evaluate