Skip to content

Commit

Permalink
Fix error caused by GitHub Actions bugs ymyzk/tox-gh-actions#198 & ac…
Browse files Browse the repository at this point in the history
  • Loading branch information
salcc committed Nov 16, 2024
1 parent f4a5569 commit 3eb4417
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ jobs:
if: github.event_name == 'pull_request' || (github.event_name == 'release' && github.event.release.prerelease == true)
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: Checkout repository
uses: actions/checkout@v4
- name: Get tags
run: git fetch --tags origin
with:
fetch-depth: 0 # Fetch full repository history, including all tags

- name: Verify available tags
run: git tag -l

- name: Set up Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -75,10 +78,13 @@ jobs:
if: needs.test.result == 'success' && (github.event_name == 'pull_request' || (github.event_name == 'release' && github.event.release.prerelease == true))
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: Checkout repository
uses: actions/checkout@v4
- name: Get tags
run: git fetch --tags origin
with:
fetch-depth: 0 # Fetch full repository history, including all tags

- name: Verify available tags
run: git tag -l

- name: Set up Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -117,10 +123,13 @@ jobs:
uses: actions/deploy-pages@v4

# Build and publish to PyPI
- name: Checkout code
- name: Checkout repository
uses: actions/checkout@v4
- name: Get tags
run: git fetch --tags origin
with:
fetch-depth: 0 # Fetch full repository history, including all tags

- name: Verify available tags
run: git tag -l

- name: Set up Python
uses: actions/setup-python@v5
Expand Down
28 changes: 13 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,19 @@ python_version = "3.8"
ignore_missing_imports = true

[tool.tox]
env_list = ["py38", "py313"] # Testing boundary versions only
isolated_build = true

[tool.tox.gh-actions]
python = """
legacy_tox_ini = """
[tox]
envlist = py38, py313
isolated_build=true
[gh-actions]
python =
3.8: py38
3.13: py313
[testenv]
passenv =
CI
GITHUB_ACTIONS
extras =
testing
commands = python -m pytest -vv --color=yes --cov=snputils --cov-report=xml
"""

[tool.tox.env]
pass_env = [
"CI",
"GITHUB_ACTIONS"
]
extras = ["testing"]
commands = [
"python -m pytest -vv --color=yes --cov=snputils --cov-report=xml"
]

0 comments on commit 3eb4417

Please sign in to comment.