Skip to content

Pin pydantic

Pin pydantic #51

name: PR Test
on:
push:
branches:
- main
tags:
- "v*"
pull_request_target:
branches:
- main
workflow_dispatch:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install package
run: pip install -e .
- name: Install dependencies
run: pip install pre-commit
- name: Run pre-commit
env:
ZENHUB_TEST_TOKEN: ${{ secrets.ZENHUB_TEST_TOKEN }}
run: pre-commit run -a
check-manifest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install package
run: pip install -e .
- name: Install dependencies
run: pip install check-manifest
- name: Run check
run: check-manifest
test:
name: ${{ matrix.python }}
runs-on: ubuntu-latest
needs: pre-commit
strategy:
fail-fast: false
matrix:
python: ["3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install package
run: pip install -e .
- name: Install dependencies
run: pip install pytest pytest-cov
- name: Run pytest
env:
ZENHUB_TEST_TOKEN: ${{ secrets.ZENHUB_TEST_TOKEN }}
run: pytest tests --cov=zenhub --cov=tests --cov-report term-missing:skip-covered
- uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
name: codecov-umbrella
fail_ci_if_error: true
verbose: true
release:
# this will run when you have tagged a commit, starting with "v*"
# and requires that you have put your twine API key in your
# github secrets (see readme for details)
needs: [test, check-manifest]
if: ${{ github.repository == 'goanpeca/pyzenhub' && contains(github.ref, 'tags') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
run: |
git tag
python -m build
twine check dist/*
twine upload dist/*
# - uses: softprops/action-gh-release@v1
# with:
# generate_release_notes: true