Skip to content

Modularity Refactor - Stop treating HTTP like it's special #400

Modularity Refactor - Stop treating HTTP like it's special

Modularity Refactor - Stop treating HTTP like it's special #400

Workflow file for this run

# Single GitHub Action to run all types of tests. But only runs on a PR, and does
# not commit any changes, nor upload them to coveralls
name: CI - Tests PR
on:
pull_request:
workflow_dispatch:
env:
# Setup all Environment Variables as tests check they exist.
PORT: 8080
SERVERURL: "https://test.github.com"
PAGINATE: 30
CACHETIME: 600000
GCLOUD_STORAGE_BUCKET: ""
GOOGLE_APPLICATION_CREDENTIALS: "nofile"
GH_CLIENTID: ""
GH_CLIENTSECRET: ""
GH_USERAGENT: "Pulsar-Edit Tester Bot"
GH_REDIRECTURI: "http://localhost:8080/api/oauth"
DB_HOST: ""
DB_USER: ""
DB_PASS: ""
DB_DB: ""
DB_PORT: 43
DB_SSL_CERT: ""
LOG_LEVEL: 6
LOG_FORMAT: "stdout"
# This helps some modules know they are in a test environment
NODE_ENV: "test"
PULSAR_STATUS: "dev"
RATE_LIMIT_GENERIC: 0
RATE_LIMIT_AUTH: 0
WEBHOOK_PUBLISH: ""
WEBHOOK_VERSION: ""
WEBHOOK_USERNAME: ""
jobs:
tests:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
node-version: [17.x, 18.x, 19.x]
steps:
- name: Checkout the latest code
uses: actions/checkout@v3
- name: Setup NodeJS - ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Dependencies
run: npm install
- name: Run Tests
run: npm run test