Add ReadFromBigQuery PTransform and Query class #181
Workflow file for this run
This file contains hidden or 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: | |
workflow_dispatch: | |
pull_request: | |
branches: [main, develop] | |
push: | |
branches: [main, develop] | |
jobs: | |
ci: | |
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.10", "3.11", "3.12"] | |
env: | |
VENV: .venv | |
steps: | |
- name: Checkout codes | |
id: checkout-codes | |
uses: actions/checkout@v4.2.2 | |
- name: Setup python | |
id: setup-python | |
uses: actions/setup-python@v5.4.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
cache: 'pip' | |
# cache option make the step fail if you don´t have requirements.txt or pyproject.toml on root. | |
# https://github.com/actions/setup-python/issues/807. | |
- name: Create virtual environment | |
run: python -m venv $VENV | |
- name: Install package with test dependencies | |
run: | | |
. $VENV/bin/activate | |
make install-test | |
- name: Run tests | |
id: run-tests | |
run: | | |
. $VENV/bin/activate | |
pytest --cov=gfw --cov-report=xml | |
- name: Upload coverage reports to Codecov | |
id: upload-coverage-reports-to-codecov | |
uses: codecov/codecov-action@v5.3.1 | |
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') && matrix.python-version == '3.12' | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true |