Skip to content

Offboarding - clean up email references #103

Offboarding - clean up email references

Offboarding - clean up email references #103

name: Test, visualize, and build calitp-data-analysis
on:
push:
branches:
- 'main'
paths:
- '.github/workflows/build-calitp-data-analysis.yml'
- 'packages/calitp-data-analysis/pyproject.toml'
- 'packages/calitp-data-analysis/calitp_data_analysis/**'
pull_request:
paths:
- '.github/workflows/build-calitp-data-analysis.yml'
- 'packages/calitp-data-analysis/pyproject.toml'
- 'packages/calitp-data-analysis/calitp_data_analysis/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
check_and_build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/calitp-data-analysis
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- uses: google-github-actions/setup-gcloud@v2
- name: Run checks
run: |
curl -sSL https://install.python-poetry.org | python -
poetry install
poetry run mypy .
poetry run pytest
poetry build
- if: ${{ github.ref != 'refs/heads/main' }}
run: |
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi $POETRY_TEST_PYPI_TOKEN_PYPI
poetry publish -r test-pypi --skip-existing
env:
POETRY_TEST_PYPI_TOKEN_PYPI: ${{ secrets.TEST_PYPI_CALITP_DATA_ANALYSIS_TOKEN }}
- if: ${{ github.ref == 'refs/heads/main' }}
run: poetry publish --skip-existing
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_CALITP_DATA_ANALYSIS_TOKEN }}