Skip to content

Commit

Permalink
build(ci): fix test phase
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikaalund committed Jun 16, 2023
1 parent 79f2984 commit f8fc666
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version:
["3.7", "3.8", "3.9", "3.10", "3.11", "pypy-3.8", "pypy-3.9"]
# Add "pypy-3.8", "pypy-3.9" again at some point
["3.7", "3.8", "3.9", "3.10", "3.11"]
include:
- os: macos-latest
python-version: "3.7"
Expand All @@ -34,12 +35,13 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- run: poetry config virtualenvs.prefer-active-python true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: rm poetry.lock && scripts/setup # Ignore poetry.lock
run: rm poetry.lock && scripts/setup ${{ matrix.python-version }} # Ignore poetry.lock
- name: Run checks
run: scripts/check --dry
- name: Test with pytest
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local_test.py
.idea/
.coverage
coverage.xml
asyncio_mqtt/_version.py
aiomqtt/_version.py
*.DS_Store
docs/_build
reports
3 changes: 3 additions & 0 deletions scripts/setup
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ set -o errexit -o pipefail -o nounset
# Change into the project's directory
cd "$(dirname "$0")/.."

python_version=$1

# Install the dependencies
#poetry env use "python$python_version"
poetry install --with dev --sync
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ set -o errexit -o pipefail -o nounset
cd "$(dirname "$0")/.."

# Run tests with pytest
poetry run pytest --failed-first --strict-config --strict-markers --verbosity=2 --cov=asyncio_mqtt --cov-report=xml --junitxml=reports/pytest.xml tests
poetry run pytest --failed-first --strict-config --strict-markers --verbosity=2 --cov=aiomqtt --cov-report=xml --junitxml=reports/pytest.xml tests

0 comments on commit f8fc666

Please sign in to comment.