Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Nightly code check
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * *' # 3 am UTC every day
jobs:
code-check:
uses: ./.github/workflows/code-check.yml
unit-tests:
uses: ./.github/workflows/unit-tests.yml
secrets:
GIST_PAT: ${{ secrets.GIST_PAT }}
security-scan:
needs: [unit-tests]
uses: ./.github/workflows/security-scan.yml
secrets:
FOSSA_TOKEN: ${{ secrets.FOSSA_TOKEN }}
SONARCLOUD_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # finish all jobs even if one fails
max-parallel: 2
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"

- name: Test with pytest
run: |
pytest tests/unit

- name: Setup database and engine
id: setup
uses: firebolt-db/integration-testing-setup@master
with:
firebolt-username: ${{ secrets.FIREBOLT_USERNAME }}
firebolt-password: ${{ secrets.FIREBOLT_PASSWORD }}
api-endpoint: "api.dev.firebolt.io"
region: "us-east-1"
db_suffix: ${{ format('{0}_{1}', matrix.os, matrix.python-version) }}

- name: Run integration tests
env:
USER_NAME: ${{ secrets.FIREBOLT_USERNAME }}
PASSWORD: ${{ secrets.FIREBOLT_PASSWORD }}
DATABASE_NAME: ${{ steps.setup.outputs.database_name }}
ENGINE_NAME: ${{ steps.setup.outputs.engine_name }}
ENGINE_URL: ${{ steps.setup.outputs.engine_url }}
STOPPED_ENGINE_NAME: ${{ steps.setup.outputs.stopped_engine_name }}
STOPPED_ENGINE_URL: ${{ steps.setup.outputs.stopped_engine_url }}
ACCOUNT_NAME: "firebolt"
FIREBOLT_BASE_URL: "api.dev.firebolt.io"
run: |
pytest -o log_cli=true -o log_cli_level=INFO tests/integration

- name: Slack Notify of failure
if: failure()
uses: rtCamp/action-slack-notify@v2.2.0
env:
SLACK_USERNAME: CI bot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: "#FF0000"
SLACK_ICON: None
SLACK_TITLE: Nightly tests failed
SLACK_MESSAGE: Please investigate
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ classifiers =
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Expand All @@ -26,9 +25,9 @@ project_urls =
[options]
packages = find:
install_requires =
firebolt-sdk>=0.8.0
firebolt-sdk>=0.9.0
sqlalchemy>=1.0.0
python_requires = >=3.6
python_requires = >=3.7
package_dir =
= src

Expand Down