Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tox ci #10

Merged
merged 19 commits into from
Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
WEBHOOK_EXISTS: ${{ secrets.SLACK_WEBHOOK_URL != '' }}

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
permissions:
contents: read # to fetch code (actions/checkout)
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
- uses: pre-commit/action@v3.0.0

test-sqlite:
test:
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
python: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install
Expand All @@ -47,8 +47,6 @@ jobs:
python -m pip install .[ci]
- name: Test
run: tox
env:
DB: sqlite
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
Expand Down
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# laces Changelog
# Laces Changelog

All notable changes to this project will be documented in this file.

Expand All @@ -9,11 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add more tests and example usage.
- Add more tests and example usage. ([#6](https://github.com/tbrlpld/laces/pull/6))

### Changed

- ...
- Fixed tox configuration to actually run Django 3.2 in CI. Tox also uses the "testing" dependencies without the need to duplicate them in the `tox.ini`. ([#10](https://github.com/tbrlpld/laces/pull/10))
- Bumped GitHub Actions to latest versions. This removes a reliance on the now deprecated Node 16. ([#10](https://github.com/tbrlpld/laces/pull/10))

### Removed

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ testing = [
"coverage==7.3.4",
]
ci = [
"tox==4.11.3",
"tox-gh-actions==3.1.3",
"tox==4.12.1",
"tox-gh-actions==3.2.0",
# Allow use of pyenv for virtual environments. To enable you need to set `VIRTUALENV_DISCOVERY=pyenv` in the shell.
# This is useful to help tox find the correct python version when using pyenv.
"virtualenv-pyenv==0.4.0"
Expand Down
19 changes: 8 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
[tox]
skipsdist = True
usedevelop = True

envlist =
python{3.8,3.9,3.10,3.11}-django{3.2,4.1,4.2}

Expand All @@ -12,16 +9,19 @@ python =
3.10: python3.10
3.11: python3.11

[gh-actions:env]
DB =
sqlite: sqlite

[testenv]
install_command = pip install -e ".[testing]" -U {opts} {packages}
package = editable
extras = testing

commands_pre =
# Mostly to check that the requirements are in order
python -m pip freeze

commands =
# Run coverage in append mode so that we get a combined report over all environments.
# This can not be combined with parallel mode.
# This only affects local working, because each env is run on a different runner in CI.
# In CI, Codecov will combine the reports.
coverage run -a testmanage.py test --deprecation all {posargs: -v 2}

commands_post =
Expand All @@ -35,9 +35,6 @@ basepython =
python3.11: python3.11

deps =
# Coverage is required here (even though it's in pyproject.toml) to make it work on GitHub Actions
coverage

django3.2: Django>=3.2,<4.0
django4.0: Django>=4.0,<4.1
django4.1: Django>=4.1,<4.2
Expand Down
Loading