Merge pull request #544 from Nethonos/patch-1 #1337
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |