Skip to content

馃殌 RELEASE: v0.7.0 #240 #573

馃殌 RELEASE: v0.7.0 #240

馃殌 RELEASE: v0.7.0 #240 #573

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@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
- uses: pre-commit/action@v3.0.0
tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11"]
# Only test the latest major release of Sphinx because otherwise we need to
# keep multiple versions of regression tests on file and this creates lots of
# noise in the tests.
sphinx: ["~=5.0"]
include:
- os: macos-latest
python-version: 3.x
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install dependencies with Sphinx ${{ matrix.sphinx }}
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade "sphinx${{matrix.sphinx}}" -e .[test] --pre
- name: Run pytest
run: >
pytest --durations=10 --cov=quantecon_book_theme --cov-report=xml --cov-report=term-missing
- name: Upload to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9 && github.repository == 'QuantEcon/quantecon-book-theme' && github.event_name == 'pull_request'
uses: codecov/codecov-action@v3.1.4
with:
name: ebp-qbt-pytests-py3.7
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/gh-action-pypi-publish@v1.1.0
with:
user: __token__
password: ${{ secrets.PYPI_KEY }}