Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
theCapypara committed Aug 6, 2024
1 parent 6f5b584 commit 0fe7cec
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
toolchain: stable
- name: Test with tox
run: tox
working-directory: tests
env:
RUSTUP_TOOLCHAIN: stable
- name: Upload Test Results
Expand Down Expand Up @@ -91,9 +92,19 @@ jobs:
run: |
sed -E -i -e "s/version\s*=\s*\"(.*)(\.rc.*|\.a.*|\.post.*)?\"/version = \"\1.dev0+${GITHUB_SHA::8}\"/;" pyproject.toml
- name: Note version
if: matrix.os != 'windows-2019'
shell: bash
run: |
PACKAGE_VERSION=$(grep "version" ./pyproject.toml | tr -d '"' | awk -F' ' '{print $3}')
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
python3 -m venv .yq-venv
. .yq-venv/bin/activate
pip install yq
echo "PACKAGE_VERSION=$(tomlq '.project.version' pyproject.toml -r)" >> $GITHUB_ENV
- name: Note version (Windows)
if: matrix.os == 'windows-2019'
run: |
pipx install yq
$env:PACKAGE_VERSION = tomlq.exe '.project.version' pyproject.toml -r
echo "PACKAGE_VERSION=$env:PACKAGE_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
Expand Down
11 changes: 7 additions & 4 deletions tox.ini → tests/tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py37, py38, py39, py310, py311
envlist = py37, py38, py39, py310, py311, py312, py313
requires = setuptools_rust
# TODO: XXX - Weird issue where tox-gh-actions is still trying to run all???
skip_missing_interpreters = true
Expand All @@ -11,14 +11,17 @@ python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313

[testenv]
usedevelop=true
commands =
pytest --junitxml pytest.xml configcrunch/tests
python ./docs/run_doctests.py
pytest --junitxml pytest.xml
python ../docs/run_doctests.py
deps =
setuptools_rust
-rrequirements.txt
-r../requirements.txt
..
pytest
pyyaml

0 comments on commit 0fe7cec

Please sign in to comment.