Skip to content

feat(translations): add scope and REST API #2737

feat(translations): add scope and REST API

feat(translations): add scope and REST API #2737

name: PostgreSQL tests
concurrency:
group: postgres-${{ github.head_ref || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- 'master'
pull_request:
jobs:
migration:
name: PostgreSQL tests - migration
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: sogebot
ports:
- 5432:5432
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.event.pull_request.head.sha }}
- id: log
name: Load commit message for skip test check
run: echo "MESSAGE=$(git log --no-merges -1 --pretty=format:%s%b)" >> $GITHUB_OUTPUT
- name: install node LTS
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
uses: actions/setup-node@v3
with:
node-version: lts/*
check-latest: true
- name: Install all dependencies and build just a bot
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
run: ENV=development NODE_MODULES_DIR=./node_modules make info clean dependencies bot
- name: Set proper db to use
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
run: npm run test:config:postgres
- name: Run migration test
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
run: npm run test:migration
postgres:
name: PostgreSQL tests - part 1
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: sogebot
ports:
- 5432:5432
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.event.pull_request.head.sha }}
- id: log
name: Load commit message for skip test check
run: echo "MESSAGE=$(git log --no-merges -1 --pretty=format:%s%b)" >> $GITHUB_OUTPUT
- name: install node LTS
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
uses: actions/setup-node@v3
with:
node-version: lts/*
check-latest: true
- name: Install all dependencies and build just a bot
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
run: ENV=development NODE_MODULES_DIR=./node_modules make info clean dependencies bot
- name: Set proper db to use
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
run: npm run test:config:postgres
- name: Run mocha
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
run: TESTS=@func1 npm test
- uses: codecov/codecov-action@v3
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
name: codecov-postgres # optional
flags: postgres
postgres2:
name: PostgreSQL tests - part 2
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: sogebot
ports:
- 5432:5432
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.event.pull_request.head.sha }}
- id: log
name: Load commit message for skip test check
run: echo "MESSAGE=$(git log --no-merges -1 --pretty=format:%s%b)" >> $GITHUB_OUTPUT
- name: install node LTS
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
uses: actions/setup-node@v3
with:
node-version: lts/*
check-latest: true
- name: Install all dependencies and build just a bot
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
run: ENV=development NODE_MODULES_DIR=./node_modules make info clean dependencies bot
- name: Set proper db to use
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
run: npm run test:config:postgres
- name: Run mocha
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
run: TESTS=@func2 npm test
- uses: codecov/codecov-action@v3
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
name: codecov-postgres # optional
flags: postgres
postgres3:
name: PostgreSQL tests - part 3
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: sogebot
ports:
- 5432:5432
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.event.pull_request.head.sha }}
- id: log
name: Load commit message for skip test check
run: echo "MESSAGE=$(git log --no-merges -1 --pretty=format:%s%b)" >> $GITHUB_OUTPUT
- name: install node LTS
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
uses: actions/setup-node@v3
with:
node-version: lts/*
check-latest: true
- name: Install all dependencies and build just a bot
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
run: ENV=development NODE_MODULES_DIR=./node_modules make info clean dependencies bot
- name: Set proper db to use
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
run: npm run test:config:postgres
- name: Run mocha
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
run: TESTS=@func3 npm test
- uses: codecov/codecov-action@v3
if: "!contains(steps.log.outputs.MESSAGE, '[skip-tests]')"
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
name: codecov-postgres # optional
flags: postgres