Skip to content

version 0.6.1 (#230) #543

version 0.6.1 (#230)

version 0.6.1 (#230) #543

Workflow file for this run

name: continuous-integration
on:
push:
branches: [master]
tags:
- 'v*'
pull_request:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: pre-commit/[email protected]
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} and Sphinx ${{ matrix.sphinx }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[test]
- name: Run pytest
run: >
pytest --durations=10 --cov=quantecon_book_theme --cov-report=xml --cov-report=term-missing
- name: Upload to Codecov
if: github.repository == 'QuantEcon/quantecon-book-theme'
uses: codecov/[email protected]
with:
name: ebp-qbt-pytests-${{ matrix.python-version}}
flags: pytests
file: ./coverage.xml
fail_ci_if_error: true
publish:
name: Publish to PyPi
needs: [pre-commit, tests]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Build package
run: |
python -m pip install -U pip build
python -m build
- name: Publish
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_KEY }}