-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,17 +9,14 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
|
||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
run: pip install .[doc] | ||
|
||
- name: Build docs | ||
run: poetry run sphinx-build -b html docs docs/_build | ||
run: sphinx-build -b html docs docs/_build | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,25 +2,25 @@ name: Publish | |
|
||
on: | ||
release: | ||
types: created | ||
types: [created] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v4 | ||
|
||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
- name: Install dependencies | ||
run: pip install build | ||
|
||
- name: Build | ||
run: poetry build | ||
run: python -m build | ||
|
||
- name: Publish to PyPI | ||
env: | ||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | ||
run: poetry publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,34 +4,32 @@ on: [push, pull_request] | |
|
||
jobs: | ||
build: | ||
name: build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}) | ||
runs-on: ubuntu-18.04 | ||
name: Build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10'] | ||
django-version: ['3.0', '3.1', '3.2', '4.0', '4.1', '4.2'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- uses: actions/cache@v2 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: py-${{ matrix.python-version }}-django-${{ matrix.django-version }}-${{ hashFiles('**/poetry.lock') }} | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-python-${{ matrix.python-version }}-django-${{ matrix.django-version }}-${{ hashFiles('pyproject.toml') }} | ||
|
||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
- name: Install Django | ||
run: pip install django==${{ matrix.django-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
poetry add django==${{ matrix.django-version }} | ||
poetry install | ||
run: pip install -e .[test] | ||
|
||
- name: Tests | ||
run: poetry run scripts/test.sh | ||
run: scripts/test.sh | ||
|
||
- name: Upload coverage | ||
uses: codecov/codecov-action@v1 | ||
uses: codecov/codecov-action@v3 |