-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from wagtail/chore/tooling-tidy-ups
Tidy ups
- Loading branch information
Showing
11 changed files
with
173 additions
and
122 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
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
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 |
---|---|---|
|
@@ -5,7 +5,6 @@ on: | |
branches: | ||
- main | ||
- 'stable/**' | ||
- 'fix-actions' | ||
|
||
pull_request: | ||
|
||
|
@@ -16,6 +15,13 @@ concurrency: | |
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
env: | ||
FORCE_COLOR: "1" # Make tools pretty. | ||
TOX_TESTENV_PASSENV: FORCE_COLOR | ||
PIP_DISABLE_PIP_VERSION_CHECK: "1" | ||
PIP_NO_PYTHON_VERSION_WARNING: "1" | ||
PYTHON_LATEST: "3.12" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
@@ -28,57 +34,44 @@ jobs: | |
with: | ||
python-version: '3.11' | ||
- uses: pre-commit/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
test-sqlite: | ||
runs-on: ubuntu-latest | ||
needs: lint | ||
strategy: | ||
matrix: | ||
python: ['3.8', '3.9'] | ||
django: ['3.2'] | ||
wagtail: ['4.1', '4.2'] | ||
include: | ||
- python: '3.10' | ||
django: '4.2' | ||
wagtail: '5.1' | ||
- python: '3.11' | ||
django: '4.2' | ||
wagtail: '5.1' | ||
|
||
python: ["3.11", "3.12"] | ||
db: ["sqlite"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install Tox | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install --upgrade tox | ||
python -m pip install --upgrade tox tox-gh-actions | ||
- name: Test | ||
run: | | ||
tox | ||
run: tox | ||
env: | ||
TOXENV: python${{ matrix.python }}-django${{ matrix.django }}-wagtail${{ matrix.wagtail }}-sqlite | ||
DB: sqlite | ||
|
||
- name: Upload coverage data | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-data | ||
path: .coverage.* | ||
if-no-files-found: ignore | ||
retention-days: 1 | ||
|
||
test-postgres: | ||
runs-on: ubuntu-latest | ||
needs: lint | ||
strategy: | ||
matrix: | ||
python: ['3.8', '3.9'] | ||
django: ['3.2'] | ||
wagtail: ['4.1', '4.2'] | ||
experimental: [false] | ||
include: | ||
- python: '3.10' | ||
django: '4.2' | ||
wagtail: '5.1' | ||
- python: '3.11' | ||
django: '4.2' | ||
wagtail: '5.1' | ||
python: ["3.11", "3.12"] | ||
db: ["postgres"] | ||
|
||
services: | ||
postgres: | ||
|
@@ -100,8 +93,50 @@ jobs: | |
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install --upgrade tox | ||
- name: Test | ||
run: | | ||
tox | ||
run: tox | ||
env: | ||
DATABASE_URL: postgres://postgres:postgres@localhost:5432/wagtail_vector_index | ||
TOXENV: python${{ matrix.python }}-django${{ matrix.django }}-wagtail${{ matrix.wagtail }}-postgres | ||
DB: postgres | ||
- name: Upload coverage data | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-data | ||
path: .coverage.* | ||
if-no-files-found: ignore | ||
retention-days: 1 | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- test-sqlite | ||
- test-postgres | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
# Use latest Python, so it understands all syntax. | ||
python-version: ${{env.PYTHON_LATEST}} | ||
|
||
- run: python -Im pip install --upgrade coverage | ||
|
||
- name: Download coverage data | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: coverage-data | ||
|
||
- name: Combine coverage | ||
run: | | ||
python -Im coverage combine | ||
python -Im coverage html --skip-covered --skip-empty | ||
python -Im coverage report | ||
echo "## Coverage summary" >> $GITHUB_STEP_SUMMARY | ||
python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY | ||
- name: Upload HTML report if check failed. | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: html-report | ||
path: htmlcov |
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
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
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
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
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
Oops, something went wrong.