Skip to content

Commit

Permalink
Split build
Browse files Browse the repository at this point in the history
  • Loading branch information
lsbardel committed Sep 29, 2023
1 parent 1d92afa commit ec458ed
Show file tree
Hide file tree
Showing 5 changed files with 779 additions and 729 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ jobs:
PYTHON_ENV: ci
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12-dev"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -38,12 +37,25 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./build/coverage.xml

book:
runs-on: ubuntu-latest
env:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
needs:
- build
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: make install-dev
- name: build book
if: ${{ matrix.python-version == '3.11' }}
run: make book
- name: publish book
if: ${{ matrix.python-version == '3.11' }}
run: make publish-book
- name: publish
if: ${{ github.ref == 'refs/heads/main' && matrix.python-version == '3.10' && github.event.head_commit.message == 'release' }}
if: ${{ github.ref == 'refs/heads/main' && github.event.head_commit.message == 'release' }}
run: make publish
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ htmlcov
dist
venv
MANIFEST
release-notes.md
.python-version
.settings
.coverage
.env
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ book: ## Build static jupyter {book}

publish-book: ## publish the book to github pages
poetry run ghp-import -n -p -f docs/_build/html

outdated: ## Show outdated packages
poetry show -o -a

0 comments on commit ec458ed

Please sign in to comment.