Skip to content

use @quasar/quasar-app-extension-testing-unit-vitest #644

use @quasar/quasar-app-extension-testing-unit-vitest

use @quasar/quasar-app-extension-testing-unit-vitest #644

Workflow file for this run

name: Sensecraft CI
on:
push:
branches:
- dev
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Use Node.js v20.14.0
uses: actions/setup-node@v4
with:
node-version: v20.14.0
- name: use postgres
uses: Daniel-Marynicz/postgresql-action@master
with:
postgres_image_tag: 16.3-alpine-jwt
postgres_image_name: conversence/postgres
- name: Install client components
run: |
sudo apt update
sudo apt install -y postgresql-client wget golang-go
go install github.com/mailhog/MailHog@latest
echo "${HOME}/go/bin" >> $GITHUB_PATH
- name: Initialize test DB
working-directory: ./server
run: python ./scripts/initial_setup.py -u postgres -p postgres --no-create-development --no-create-production --app_name sensecraft
- name: install postgrest
run: |
wget https://github.com/PostgREST/postgrest/releases/download/v12.2.2/postgrest-v12.2.2-linux-static-x64.tar.xz
tar -Jxf postgrest-v12.2.2-linux-static-x64.tar.xz
rm postgrest-v12.2.2-linux-static-x64.tar.xz
sudo mv postgrest /usr/bin/
- name: Install server dependencies
working-directory: ./server
run: npm ci
- name: Build dispatcher
working-directory: ./server
run: npm run build
- name: Run server tests
working-directory: ./server
run: npm run test
- name: Install client dependencies
working-directory: ./client
run: |
npm ci
npx @puppeteer/browsers install chrome@stable
npx @puppeteer/browsers install chromedriver@stable
- name: Run client unit tests
working-directory: ./client
run: npm run test:unit
- name: Run scoring tests
working-directory: ./client
run: npm run test:scoring
- name: Run integration tests
working-directory: ./client
run: npm run test:integration
- name: cleanup postgres container
run: |
export PGCONT=`docker ps -q --filter ancestor=conversence/postgres:16.3-alpine-jwt`
if [[-n $PGCONT]]
then
docker container stop $PGCONT
docker container rm $PGCONT
fi