Bump google-github-actions/auth from 2.0.0 to 2.0.1 (#200) #834
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
# We would like to trigger for CI for any pull request action - | |
# both from QuantCo's branches as well as forks. | |
pull_request: | |
types: [opened, labeled, unlabeled, synchronize] | |
# In addition to pull requests, we want to run CI for pushes | |
# to the main branches and tags. | |
push: | |
branches: | |
- 'main' | |
- 'pre-commit-autoupdate' | |
tags: | |
- 'v*' | |
jobs: | |
pre-commit-checks: | |
name: "pre-commit hooks - Python 3.8" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Install Python 3.8 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
- name: Run pre-commit checks | |
uses: pre-commit/[email protected] | |
unit-tests: | |
name: "unit tests - Python ${{ matrix.PYTHON_VERSION }} - SA ${{ matrix.SA_VERSION }}" | |
runs-on: ubuntu-latest | |
env: | |
CI: True | |
strategy: | |
fail-fast: true | |
matrix: | |
PYTHON_VERSION: ['3.8', '3.9', '3.10'] | |
SA_VERSION: ['<2.0', '>=2.0'] | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Set up micromamba | |
uses: mamba-org/setup-micromamba@e820223f89c8720d6c740ca154a7adf32fcd278a | |
with: | |
environment-file: environment.yml | |
cache-downloads: true | |
cache-environment: true | |
cache-environment-key: ${{ runner.os }}-${{ hashFiles('environment.yml') }}-${{ matrix.PYTHON_VERSION }}-${{ matrix.SA_VERSION }} | |
create-args: >- | |
python=${{ matrix.PYTHON_VERSION }} | |
sqlalchemy${{ matrix.SA_VERSION }} | |
- name: Run tests | |
uses: ./.github/actions/pytest | |
with: | |
args: "tests/unit" | |
mssql: | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'sqlserver') || contains(github.event.pull_request.labels.*.name, 'ready') || github.ref == 'refs/heads/main' }} | |
name: "mssql - Python ${{ matrix.PYTHON_VERSION }} - SA ${{ matrix.SA_VERSION }}" | |
runs-on: ubuntu-20.04 | |
env: | |
CI: True | |
strategy: | |
fail-fast: false | |
matrix: | |
PYTHON_VERSION: ['3.8', '3.9', '3.10'] | |
SA_VERSION: ["<2.0", ">=2.0"] | |
services: | |
DB: | |
image: mcr.microsoft.com/mssql/server:2019-latest | |
env: | |
ACCEPT_EULA: Y | |
SA_PASSWORD: datajudge-123 | |
ports: | |
- 1433:1433 | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Set up micromamba | |
uses: mamba-org/setup-micromamba@e820223f89c8720d6c740ca154a7adf32fcd278a | |
with: | |
environment-file: environment.yml | |
cache-downloads: true | |
cache-environment: true | |
cache-environment-key: ${{ runner.os }}-${{ hashFiles('environment.yml') }}-${{ matrix.PYTHON_VERSION }}-${{ matrix.SA_VERSION }} | |
create-args: >- | |
python=${{ matrix.PYTHON_VERSION }} | |
sqlalchemy${{ matrix.SA_VERSION }} | |
pyodbc | |
# TODO: Consider removing this manual installation since the docker image already comes with a msodbc driver. | |
- name: Install msodbcsql17 driver | |
shell: bash -l {0} | |
run: | | |
wget https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/m/msodbcsql17/msodbcsql17_17.9.1.1-1_amd64.deb | |
ACCEPT_EULA=Y sudo apt install ./msodbcsql17_17.9.1.1-1_amd64.deb --allow-downgrades | |
- name: Wait for SQL Server | |
timeout-minutes: 1 | |
run: until docker logs "${{ job.services.db.id }}" 2>&1 | grep -q "SQL Server is now ready"; do sleep 10; done | |
- name: Run tests | |
uses: ./.github/actions/pytest | |
with: | |
backend: mssql | |
args: tests/integration | |
postgres: | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'postgres') || contains(github.event.pull_request.labels.*.name, 'ready') || github.ref == 'refs/heads/main' }} | |
name: "PostgreSQL ${{ matrix.POSTGRES_VERSION }} - Python ${{ matrix.PYTHON_VERSION }} - SA ${{ matrix.SA_VERSION }}" | |
runs-on: ubuntu-20.04 | |
env: | |
CI: True | |
strategy: | |
fail-fast: false | |
matrix: | |
PYTHON_VERSION: [ '3.8', '3.9', '3.10' ] | |
POSTGRES_VERSION: [ '11', 'latest' ] | |
SA_VERSION: ["<2.0", ">=2.0"] | |
services: | |
DB: | |
image: postgres:${{ matrix.POSTGRES_VERSION }} | |
env: | |
POSTGRES_USER: datajudge | |
POSTGRES_PASSWORD: datajudge | |
POSTGRES_DB: datajudge | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Set up micromamba | |
uses: mamba-org/setup-micromamba@e820223f89c8720d6c740ca154a7adf32fcd278a | |
with: | |
environment-file: environment.yml | |
cache-downloads: true | |
cache-environment: true | |
cache-environment-key: ${{ runner.os }}-${{ hashFiles('environment.yml') }}-${{ matrix.PYTHON_VERSION }}-${{ matrix.SA_VERSION }} | |
create-args: >- | |
python=${{ matrix.PYTHON_VERSION }} | |
sqlalchemy${{ matrix.SA_VERSION }} | |
psycopg2 | |
- name: Run tests | |
uses: ./.github/actions/pytest | |
with: | |
backend: postgres | |
args: tests/integration | |
db2: | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'db2') || contains(github.event.pull_request.labels.*.name, 'ready') || github.ref == 'refs/heads/main' }} | |
name: "DB2 - Python ${{ matrix.PYTHON_VERSION }} - SA ${{ matrix.SA_VERSION }}" | |
runs-on: ubuntu-20.04 | |
env: | |
CI: True | |
strategy: | |
fail-fast: false | |
matrix: | |
PYTHON_VERSION: [ '3.8', '3.9', '3.10' ] | |
SA_VERSION: ["<2.0"] | |
services: | |
DB: | |
image: ibmcom/db2:11.5.5.1 | |
env: | |
LICENSE: accept | |
DB2INSTANCE: db2inst1 | |
DB2INST1_PASSWORD: password | |
DBNAME: testdb | |
UPDATEAVAIL: "NO" | |
options: --privileged | |
ports: | |
- 50000:50000 | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Set up micromamba | |
uses: mamba-org/setup-micromamba@e820223f89c8720d6c740ca154a7adf32fcd278a | |
with: | |
environment-file: environment.yml | |
cache-downloads: true | |
cache-environment: true | |
cache-environment-key: ${{ runner.os }}-${{ hashFiles('environment.yml') }}-${{ matrix.PYTHON_VERSION }}-${{ matrix.SA_VERSION }} | |
create-args: >- | |
python=${{ matrix.PYTHON_VERSION }} | |
sqlalchemy${{ matrix.SA_VERSION }} | |
ibm_db | |
ibm_db_sa | |
- name: Wait for db2 to load | |
timeout-minutes: 2 | |
run: until docker logs "${{ job.services.db.id }}" 2>&1 | grep -q 'Setup has completed.'; do sleep 5; done | |
- name: Run tests | |
uses: ./.github/actions/pytest | |
with: | |
backend: db2 | |
args: tests/integration | |
snowflake: | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'snowflake') || contains(github.event.pull_request.labels.*.name, 'ready') || github.ref == 'refs/heads/main' }} | |
name: "Snowflake - Python ${{ matrix.PYTHON_VERSION }} - SA ${{ matrix.SA_VERSION }}" | |
runs-on: ubuntu-latest | |
env: | |
SNOWFLAKE_USER: DATAJUDGE | |
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }} | |
SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }} | |
strategy: | |
fail-fast: false | |
matrix: | |
PYTHON_VERSION: [ '3.8' ] | |
SA_VERSION: ["<2.0"] | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Set up micromamba | |
uses: mamba-org/setup-micromamba@e820223f89c8720d6c740ca154a7adf32fcd278a | |
with: | |
environment-file: environment.yml | |
cache-downloads: true | |
cache-environment: true | |
cache-environment-key: ${{ runner.os }}-${{ hashFiles('environment.yml') }}-${{ matrix.PYTHON_VERSION }}-${{ matrix.SA_VERSION }} | |
create-args: >- | |
python=${{ matrix.PYTHON_VERSION }} | |
sqlalchemy${{ matrix.SA_VERSION }} | |
snowflake-sqlalchemy | |
- name: Run tests | |
uses: ./.github/actions/pytest | |
with: | |
backend: snowflake | |
args: tests/integration | |
bigquery: | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'bigquery') || contains(github.event.pull_request.labels.*.name, 'ready') || github.ref == 'refs/heads/main' }} | |
name: "BigQuery - Python ${{ matrix.PYTHON_VERSION }} - SA ${{ matrix.SA_VERSION }}" | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
PYTHON_VERSION: [ '3.8' ] | |
SA_VERSION: ["<2.0"] | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Set up micromamba | |
uses: mamba-org/setup-micromamba@e820223f89c8720d6c740ca154a7adf32fcd278a | |
with: | |
environment-file: environment.yml | |
cache-downloads: true | |
cache-environment: true | |
cache-environment-key: ${{ runner.os }}-${{ hashFiles('environment.yml') }}-${{ matrix.PYTHON_VERSION }}-${{ matrix.SA_VERSION }} | |
create-args: >- | |
python=${{ matrix.PYTHON_VERSION }} | |
sqlalchemy${{ matrix.SA_VERSION }} | |
sqlalchemy-bigquery | |
- id: 'auth' | |
name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@f6de81663f7788d05bd15bcce18f0e57f23f0846' | |
with: | |
credentials_json: '${{ secrets.GCP_KEY }}' | |
- name: Run tests | |
uses: ./.github/actions/pytest | |
with: | |
backend: bigquery | |
args: -n auto tests/integration | |
impala-column: | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'impala') || contains(github.event.pull_request.labels.*.name, 'ready') || github.ref == 'refs/heads/main' }} | |
name: "Impala - Python ${{ matrix.PYTHON_VERSION }} - SA ${{ matrix.SA_VERSION }}" | |
runs-on: ubuntu-20.04 | |
env: | |
CI: True | |
strategy: | |
fail-fast: false | |
matrix: | |
PYTHON_VERSION: [ '3.8' ] | |
SA_VERSION: ["<2.0"] | |
PYTEST_ARG: ["tests/integration/test_column_capitalization.py", "tests/integration/test_data_source.py", "tests/integration/test_integration.py -k row", "tests/integration/test_integration.py -k uniques", "tests/integration/test_integration.py -k date", "tests/integration/test_integration.py -k varchar", "tests/integration/test_integration.py -k numeric"] | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Set up micromamba | |
uses: mamba-org/setup-micromamba@e820223f89c8720d6c740ca154a7adf32fcd278a | |
with: | |
environment-file: environment.yml | |
cache-downloads: true | |
cache-environment: true | |
cache-environment-key: ${{ runner.os }}-${{ hashFiles('environment.yml') }}-${{ matrix.PYTHON_VERSION }}-${{ matrix.SA_VERSION }} | |
create-args: >- | |
python=${{ matrix.PYTHON_VERSION }} | |
sqlalchemy${{ matrix.SA_VERSION }} | |
impyla | |
- name: Set up container | |
run: docker compose up --wait impala | |
- name: Run tests | |
uses: ./.github/actions/pytest | |
with: | |
backend: impala | |
args: ${{ matrix.PYTEST_ARG }} |