forked from confused-Techie/atom-backend
-
-
Notifications
You must be signed in to change notification settings - Fork 11
63 lines (54 loc) · 1.38 KB
/
ci-tests-pull.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# 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