Adding SecretFetcher
to pyproject.toml
#270
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: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
- tz/strong-typed-factory | |
release: | |
types: | |
- created | |
jobs: | |
test: | |
name: ${{ matrix.lang }} tests on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
lang: [Python] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install Poetry | |
run: | | |
pip install --upgrade pip | |
pip install poetry coveragepy-lcov==0.1.1 | |
- name: Configure poetry | |
run: poetry config virtualenvs.in-project true | |
- name: Setup Cache Poetry virtualenv | |
uses: actions/cache@v1 | |
id: cached-poetry-dependencies | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/test.yml') }} | |
- name: Ensure cache is healthy | |
if: steps.cached-poetry-dependencies.outputs.cache-hit == 'true' | |
run: | | |
poetry show || rm -rf .venv | |
- name: Install Dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: | | |
poetry install -E dask -E spark -E kubernetes | |
poetry run pip install --upgrade git+https://github.com/zillow/metaflow.git@feature/kfp | |
- name: Code Quality Check | |
run: | | |
poetry run black zdatasets --check | |
poetry run flake8 zdatasets | |
- name: Execute Python tests | |
run: | | |
poetry run pytest zdatasets | |
pip install coverage==6.1.2 | |
coveragepy-lcov | |
- name: Publish to coveralls.io | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: lcov.info | |
- name: Poetry Build | |
run: | | |
poetry build | |
- name: Publish distribution to Test PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ | |
skip_existing: true | |
- name: Publish distribution to PyPI | |
if: github.event_name == 'release' && github.event.action == 'created' | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |