From 0fdc6689acce07d94b58d6c3776b673de20ba478 Mon Sep 17 00:00:00 2001 From: Yusuke Miyazaki Date: Sun, 13 Nov 2022 16:03:20 +0900 Subject: [PATCH] Improve CI environment --- .github/workflows/packaging.yml | 6 +++--- .github/workflows/tests.yml | 22 ++++++++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 650a6ba..bb7e4e3 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -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 @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0fa4555..50ec88f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -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