Skip to content

silly logs

silly logs #6361

Workflow file for this run

# This workflow will do a clean install of node dependencies, 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: Node.js CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 25
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: saltcorn_test
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "16.x"
- run: npm install -g eslint@8.57.0
- run: eslint .
- run: psql -d saltcorn_test --command='create extension "uuid-ossp";'
env:
PGHOST: localhost
PGUSER: postgres
PGDATABASE: saltcorn_test
PGPASSWORD: postgres
- run: npm install --legacy-peer-deps
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "true"
SKIP_DOCKER_IMAGE_INSTALL: "true"
- run: npm run tsc
- run: echo '127.0.0.1 example.com sub.example.com sub1.example.com sub2.example.com sub3.example.com sub4.example.com sub5.example.com' | sudo tee -a /etc/hosts
- run: echo '127.0.0.1 otherexample.com' | sudo tee -a /etc/hosts
- run: packages/saltcorn-cli/bin/saltcorn run-tests
env:
CI: true
SALTCORN_MULTI_TENANT: true
SALTCORN_SESSION_SECRET: "rehjtyjrtjr"
SALTCORN_JWT_SECRET: "2f75ade09981d68f366a4e577025440d10b735cc270fc2092077140f98a41dab331589c79364601150816d9a3c6f34abf881019e2097e21a24963c56b9135bbb"
SALTCORN_NWORKERS: 1
PUPPETEER_CHROMIUM_BIN: "/usr/bin/google-chrome"
PGHOST: localhost
PGUSER: postgres
PGDATABASE: saltcorn_test
PGPASSWORD: postgres
- run: packages/saltcorn-cli/bin/saltcorn run-tests saltcorn-data
env:
SQLITE_FILEPATH: /tmp/testdb.sqlite
CI: true
SALTCORN_MULTI_TENANT: true
SALTCORN_SESSION_SECRET: "rehjtyjrtjr"
SALTCORN_JWT_SECRET: "2f75ade09981d68f366a4e577025440d10b735cc270fc2092077140f98a41dab331589c79364601150816d9a3c6f34abf881019e2097e21a24963c56b9135bbb"
- run: packages/saltcorn-cli/bin/saltcorn run-tests server
env:
SQLITE_FILEPATH: /tmp/testdb.sqlite
CI: true
SALTCORN_MULTI_TENANT: true
SALTCORN_SESSION_SECRET: "rehjtyjrtjr"
SALTCORN_JWT_SECRET: "2f75ade09981d68f366a4e577025440d10b735cc270fc2092077140f98a41dab331589c79364601150816d9a3c6f34abf881019e2097e21a24963c56b9135bbb"
- run: packages/saltcorn-cli/bin/saltcorn run-tests view-queries
env:
REMOTE_QUERIES: true
SQLITE_FILEPATH: /tmp/sctestdb
CI: true
SALTCORN_MULTI_TENANT: true
SALTCORN_JWT_SECRET: "2f75ade09981d68f366a4e577025440d10b735cc270fc2092077140f98a41dab331589c79364601150816d9a3c6f34abf881019e2097e21a24963c56b9135bbb"
# workaround for prepareQueryEnviroment()
JSON_WEB_TOKEN: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbkBmb28uY29tIiwicm9sZV9pZCI6MSwiaXNzIjoic2FsdGNvcm5Ac2FsdGNvcm4iLCJhdWQiOiJzYWx0Y29ybi1tb2JpbGUtYXBwIiwiaWF0IjoxOTI0OTA1NjAwMDAwLCJleHAiOjE5MjQ5MDU2MDAwMDB9.eE370EdQr90y9woWDzeDzZgGVsUSlfAmtykeAJ_gJjA"