Skip to content

Commit 27248a5

Browse files
authored
ci: Add nightly tests (#110)
1 parent bb961af commit 27248a5

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/nightly.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Nightly code check
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 6 * * *' # 6 am UTC every day
6+
jobs:
7+
tests:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
fail-fast: false # finish all jobs even if one fails
11+
max-parallel: 2
12+
matrix:
13+
os: ['macos-latest', 'windows-latest', 'ubuntu-latest']
14+
node-version: ['18', '20', '22']
15+
steps:
16+
- name: Check out code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
24+
- name: Install dependencies
25+
run: npm install
26+
27+
- name: Setup database and engine
28+
id: setup
29+
uses: firebolt-db/integration-testing-setup@v2
30+
with:
31+
firebolt-client-id: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }}
32+
firebolt-client-secret: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }}
33+
account: ${{ vars.FIREBOLT_ACCOUNT }}
34+
api-endpoint: "api.staging.firebolt.io"
35+
db_suffix: ${{ format('{0}_{1}', matrix.os, matrix.node-version) }}
36+
37+
- name: Run integration tests
38+
env:
39+
FIREBOLT_ACCOUNT: ${{ vars.FIREBOLT_ACCOUNT }}
40+
FIREBOLT_DATABASE: ${{ steps.setup.outputs.database_name }}
41+
FIREBOLT_ENGINE_NAME: ${{ steps.setup.outputs.engine_name }}
42+
FIREBOLT_API_ENDPOINT: "api.staging.firebolt.io"
43+
FIREBOLT_CLIENT_ID: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }}
44+
FIREBOLT_CLIENT_SECRET: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }}
45+
run: |
46+
npm run test:ci integration/v2
47+
48+
- name: Slack Notify of failure
49+
if: failure()
50+
id: slack
51+
uses: firebolt-db/action-slack-nightly-notify@v1
52+
with:
53+
os: ${{ matrix.os }}
54+
programming-language: Node
55+
language-version: ${{ matrix.node-version }}
56+
notifications-channel: 'ecosystem-ci-notifications'
57+
slack-api-key: ${{ secrets.SLACK_BOT_TOKEN }}

0 commit comments

Comments
 (0)