diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 31d995eab..76b2dd514 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -11,13 +11,13 @@ jobs: # To make it secure against malicious pull requests, you cannot trust files in the PR, # because pull_request_target jobs have more permissions than pull_request jobs. # Here we place the PR's stuff to a subdirectory named "pr". - - uses: actions/checkout@v3 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.head_ref }} path: ./pr - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.11" cache: pip @@ -49,7 +49,7 @@ jobs: for dep in content["project"]["optional-dependencies"]["dev"]: print(dep) ' >> pr/requirements-dev.txt - - uses: stefanzweifel/git-auto-commit-action@v4 + - uses: stefanzweifel/git-auto-commit-action@v5 with: repository: ./pr commit_message: "Run pycln, pyupgrade, black and isort" diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index caf6a8905..03de53c08 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -9,8 +9,8 @@ jobs: mypy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: "3.11" cache: pip @@ -28,31 +28,43 @@ jobs: time mypy --platform darwin --python-version 3.10 porcupine docs/extensions.py time mypy --platform darwin --python-version 3.11 porcupine docs/extensions.py - pytest: + pytest-windows: timeout-minutes: 10 + runs-on: windows-latest strategy: matrix: - os: ["ubuntu-latest", "windows-latest"] python-version: ["3.8", "3.9", "3.10", "3.11"] - runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: pip - run: pip install wheel - run: pip install -r requirements-dev.txt - - if: matrix.os == 'ubuntu-latest' - # Make sure that it doesn't crash with Noto Color Emoji installed - run: sudo apt install --no-install-recommends fonts-noto-color-emoji tkdnd - - if: matrix.os == 'windows-latest' + - name: Download tkdnd run: | python scripts/download-tkdnd.py echo "TCLLIBPATH=lib" >> $env:GITHUB_ENV - - uses: GabrielBB/xvfb-action@v1.4 + - run: python -m pytest --durations=10 + + pytest-linux: + timeout-minutes: 10 + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - run: python -m pytest --durations=10 + python-version: ${{ matrix.python-version }} + cache: pip + - run: pip install wheel + - run: pip install -r requirements-dev.txt + # Make sure that it doesn't crash with Noto Color Emoji installed + - run: sudo apt install --no-install-recommends fonts-noto-color-emoji tkdnd xvfb + - run: xvfb-run python -m pytest --durations=10 # Separate from other pytests because tkinter doesn't work on macos with actions/setup-python. # It imports, but gives this error: RuntimeError: tk.h version (8.6) doesn't match libtk.a version (8.5) @@ -67,7 +79,7 @@ jobs: TCLLIBPATH: ./lib PYTHON: /usr/local/opt/python@${{ matrix.python-version }}/libexec/bin/python steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: brew install python@${{ matrix.python-version }} # https://stackoverflow.com/a/66919851 - if: matrix.python-version != '3.8' @@ -81,8 +93,8 @@ jobs: timeout-minutes: 5 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: "3.11" cache: pip diff --git a/.github/workflows/release-builds.yml b/.github/workflows/release-builds.yml index ce4a6d051..cf88d5397 100644 --- a/.github/workflows/release-builds.yml +++ b/.github/workflows/release-builds.yml @@ -8,8 +8,8 @@ jobs: windows-build: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: "3.8" # last version supporting windows 7 cache: pip @@ -20,7 +20,7 @@ jobs: platform: x64 # -u makes print show in real time - run: python -u scripts/build-exe-installer.py - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: windows-exe path: build/PorcupineSetup_*.exe @@ -29,8 +29,8 @@ jobs: #docs: # runs-on: ubuntu-latest # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v4 + # - uses: actions/checkout@v4 + # - uses: actions/setup-python@v5 # with: # python-version: "3.11" # cache: pip @@ -46,12 +46,12 @@ jobs: changelog: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: | # Extract second "## blah" separated part, excluding the "## blah" lines # https://stackoverflow.com/a/20943815 awk '/^## / { part++ } (part == 1 && line++ != 0) { print }' CHANGELOG.md | tee changelog_part.md - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: changelog path: changelog_part.md @@ -63,10 +63,10 @@ jobs: needs: [windows-build, changelog] if: startsWith(github.ref, 'refs/tags/v') steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: windows-exe - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: changelog - id: get_version