-
Notifications
You must be signed in to change notification settings - Fork 43
38 lines (38 loc) · 1.05 KB
/
nodejs.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
name: Node.js CI
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
runner-job:
runs-on: ubuntu-latest
if: ${{ github.head_ref != 'translations' }}
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
matrix:
node-version: [21.6.1]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm i -g npm@latest
- run: npm ci
- run: npm run build --if-present
- run: sed -i -e 's/"<Discord bot token>"/"${{secrets.DISCORD_TOKEN}}"/g' .env
- run: sed -i -e 's/"<Discord client secret>"/"${{secrets.DISCORD_SECRET}}"/g' .env
- run: sed -i -e 's/"!wiki "/"!test "/g' .env
- run: npm test -- --timeout:60
timeout-minutes: 5