Skip to content

Iceberg

Iceberg #113

Workflow file for this run

name: Run Tests
on:
push:
branches: [ main ]
paths-ignore:
- version.md
pull_request:
branches: [ main ]
workflow_call:
secrets:
TEST_SNOWFLAKE_ACCOUNT:
required: true
TEST_SNOWFLAKE_USER:
required: true
TEST_SNOWFLAKE_PASSWORD:
required: true
VAR_STORAGE_BASE_URL:
required: true
VAR_STORAGE_ROLE_ARN:
required: true
VAR_STORAGE_AWS_EXTERNAL_ID:
required: true
CODECOV_TOKEN:
required: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Create a virtual environment
run: |
python -m venv .venv
- name: Install dependencies
run: |
source ./.venv/bin/activate
python -m pip install --upgrade pip
make install-dev
- name: Run checks (linter, code style, tests)
run: |
source ./.venv/bin/activate
python -m pytest --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
integration:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- environment: snowflake-aws-standard
edition: standard
- environment: snowflake-aws-enterprise
edition: enterprise
environment: ${{ matrix.environment }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Create a virtual environment
run: |
python -m venv .venv
- name: Install dependencies
run: |
source ./.venv/bin/activate
python -m pip install --upgrade pip
make install-dev
- name: Run integration tests
run: |
source ./.venv/bin/activate
python -m pytest --snowflake -m "standard or ${{ matrix.edition }}" --cov=./ --cov-report=xml
env:
TEST_SNOWFLAKE_ACCOUNT: ${{ secrets.TEST_SNOWFLAKE_ACCOUNT }}
TEST_SNOWFLAKE_USER: ${{ secrets.TEST_SNOWFLAKE_USER }}
TEST_SNOWFLAKE_PASSWORD: ${{ secrets.TEST_SNOWFLAKE_PASSWORD }}
VAR_STORAGE_BASE_URL: ${{ secrets.VAR_STORAGE_BASE_URL }}
VAR_STORAGE_ROLE_ARN: ${{ secrets.VAR_STORAGE_ROLE_ARN }}
VAR_STORAGE_AWS_EXTERNAL_ID: ${{ secrets.VAR_STORAGE_AWS_EXTERNAL_ID }}
TEST_SNOWFLAKE_ROLE: ACCOUNTADMIN
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}