Skip to content

Commit

Permalink
Improve CI environment
Browse files Browse the repository at this point in the history
  • Loading branch information
ymyzk committed Nov 13, 2022
1 parent 7638359 commit 0fdc668
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/packaging.yml
Expand Up @@ -18,9 +18,9 @@ jobs:
python-version: [3.11]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -30,7 +30,7 @@ jobs:
run: python -m build
- name: Run twine check
run: twine check dist/*
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: tox-gh-actions-dist
path: dist
22 changes: 14 additions & 8 deletions .github/workflows/tests.yml
Expand Up @@ -13,17 +13,23 @@ jobs:
matrix:
# https://help.github.com/articles/virtual-environments-for-github-actions
platform:
- ubuntu-18.04
- ubuntu-latest # ubuntu-20.04
- macos-latest # macOS-10.15
- windows-2016
- windows-latest # windows-2019
python-version: [3.7, 3.8, 3.9, '3.10', '3.11', pypy-3.7, pypy-3.8, pypy-3.9]
- macos-latest # macOS-11
- windows-latest # windows-2022
python-version: [3.7, 3.8, 3.9, '3.10', '3.11', 3.12-dev, pypy-2.7, pypy-3.7, pypy-3.8, pypy-3.9]

steps:
- uses: actions/checkout@v3
if: ${{ ! startsWith(matrix.python-version, 'pypy-') }}
- uses: actions/checkout@v1
if: ${{ startsWith(matrix.python-version, 'pypy-') }}
# Using actions/checkout@v2 or later with pypy causes an error
# https://foss.heptapod.net/pypy/pypy/-/issues/3640
# py.error.ENOENT: [No such file or directory]:
# listdir('/home/runner/work/tox-gh-actions/tox-gh-actions/.tox/dist/
# warnings.warn(f\'"{wd.path}" is shallow and may cause errors\')',)
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -35,11 +41,11 @@ jobs:
run: tox
- name: Upload coverage.xml
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11' }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: tox-gh-actions-coverage
path: coverage.xml
if-no-files-found: error
- name: Upload coverage.xml to codecov
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11' }}
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2

0 comments on commit 0fdc668

Please sign in to comment.