2022-10-25 13:06:03 -07:00
|
|
|
name: Test Postgres and MySQL schemas
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *'
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2023-05-10 07:16:33 -07:00
|
|
|
timeout-minutes: 60
|
2022-10-25 13:06:03 -07:00
|
|
|
|
|
|
|
env:
|
|
|
|
DB_MYSQLDB_PASSWORD: password
|
|
|
|
DB_POSTGRESDB_PASSWORD: password
|
|
|
|
|
|
|
|
steps:
|
2023-08-22 02:21:16 -07:00
|
|
|
- uses: actions/checkout@v3.5.3
|
2022-10-25 13:06:03 -07:00
|
|
|
|
2023-08-22 02:21:16 -07:00
|
|
|
- uses: pnpm/action-setup@v2.4.0
|
2022-11-09 08:32:05 -08:00
|
|
|
|
2023-08-22 02:21:16 -07:00
|
|
|
- uses: actions/setup-node@v3.7.0
|
2022-10-25 13:06:03 -07:00
|
|
|
with:
|
2023-06-02 06:23:28 -07:00
|
|
|
node-version: 18.x
|
2022-11-09 08:32:05 -08:00
|
|
|
cache: 'pnpm'
|
2022-10-25 13:06:03 -07:00
|
|
|
|
2022-11-09 08:32:05 -08:00
|
|
|
- name: Install dependencies
|
|
|
|
run: pnpm install --frozen-lockfile
|
2022-10-25 13:06:03 -07:00
|
|
|
|
|
|
|
- name: Start MySQL & Postgres
|
|
|
|
uses: isbang/compose-action@v1.3.2
|
|
|
|
with:
|
|
|
|
compose-file: ./.github/docker-compose.yml
|
|
|
|
|
2023-05-10 07:16:33 -07:00
|
|
|
- name: Build Core, Workflow, and CLI
|
2023-05-17 07:40:53 -07:00
|
|
|
run: pnpm --filter @n8n/client-oauth2 --filter n8n-workflow --filter n8n-core --filter n8n build
|
2022-10-25 13:06:03 -07:00
|
|
|
|
|
|
|
- name: Test MySQL
|
|
|
|
working-directory: packages/cli
|
2023-06-21 08:10:47 -07:00
|
|
|
run: DB_TABLE_PREFIX=test_ pnpm test:mysql
|
2022-10-25 13:06:03 -07:00
|
|
|
|
|
|
|
- name: Test Postgres
|
|
|
|
working-directory: packages/cli
|
2023-06-21 08:10:47 -07:00
|
|
|
run: DB_POSTGRESDB_SCHEMA=alt_schema DB_TABLE_PREFIX=test_ pnpm test:postgres
|
2023-03-30 06:09:13 -07:00
|
|
|
|
2022-11-17 09:52:03 -08:00
|
|
|
- name: Notify Slack on failure
|
|
|
|
uses: act10ns/slack@v2.0.0
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
status: ${{ job.status }}
|
|
|
|
channel: '#updates-build-alerts'
|
|
|
|
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
|
2022-12-20 05:13:24 -08:00
|
|
|
message: Postgres or MySQL tests failed (${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
|