From daab538ecd888672583d97840891efb742816274 Mon Sep 17 00:00:00 2001 From: Charlie Powell <31997505+cp2004@users.noreply.github.com> Date: Wed, 19 Jun 2024 16:27:15 +0100 Subject: [PATCH] :arrow_up: Quick upgrade to actions They're still a bit of a mess but will sort out at a later date :rocket: --- .github/workflows/release.yml | 12 +++--- .github/workflows/test.yaml | 81 +++++++---------------------------- 2 files changed, 21 insertions(+), 72 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb9c788..8255216 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,13 +8,13 @@ jobs: name: ๐Ÿ”จ Build distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: ๐Ÿ— Set up Python 3.10 - uses: actions/setup-python@v4 + - name: ๐Ÿ— Set up Python 3.11 + uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.11" - name: ๐Ÿ— Install build dependencies run: | python -m pip install wheel --user @@ -26,7 +26,7 @@ jobs: run: | mv dist/Marlin\ EEPROM\ editor-*.zip dist/sdist.zip - name: โฌ† Upload build result - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: dist path: dist @@ -36,7 +36,7 @@ jobs: needs: build strategy: matrix: - python: ["3.7", "3.9", "3.11"] + python: ["3.7", "3.9", "3.11", "3.12"] runs-on: ubuntu-latest steps: - name: ๐Ÿ— Set up Python ${{ matrix.python }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 190bfb5..07f7bca 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,13 +11,13 @@ jobs: name: ๐Ÿ”จ Build distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: ๐Ÿ— Set up Python 3.10 - uses: actions/setup-python@v4 + - name: ๐Ÿ— Set up Python 3.11 + uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.11" - name: ๐Ÿ— Install build dependencies run: | python -m pip install wheel --user @@ -43,9 +43,9 @@ jobs: octoprint: [">=1.5.0"] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: ๐Ÿ— Set up Python ${{ matrix.python }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - name: ๐Ÿ— Set up test dependencies @@ -57,73 +57,22 @@ jobs: run: | pytest - lint-black: - name: ๐Ÿงน black + pre-commit: + name: ๐Ÿงน pre-commit runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: ๐Ÿ— Set up Python 3.10 - uses: actions/setup-python@v1 + - uses: actions/checkout@v4 + - name: ๐Ÿ— Set up Python 3.11 + uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.11" - name: ๐Ÿ— Set up dev dependencies run: | python -m pip install wheel --user pip install octoprint[develop] - - name: ๐Ÿš€ Run black + - name: ๐Ÿš€ Run pre-commit run: | - pre-commit run --hook-stage manual black --all-files --show-diff-on-failure - - lint-prettier: - name: ๐Ÿงน prettier - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: ๐Ÿ— Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: ๐Ÿ— Set up dev dependencies - run: | - python -m pip install wheel --user - pip install octoprint[develop] - - name: ๐Ÿš€ Run prettier - run: | - pre-commit run --hook-stage manual prettier --all-files --show-diff-on-failure - - lint-isort: - name: ๐Ÿงน isort - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: ๐Ÿ— Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: ๐Ÿ— Set up dev dependencies - run: | - python -m pip install wheel --user - pip install octoprint[develop] - - name: ๐Ÿš€ Run isort - run: | - pre-commit run --hook-stage manual isort --all-files --show-diff-on-failure - - lint-flake8: - name: ๐Ÿงน Flake8 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: ๐Ÿ— Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: ๐Ÿ— Set up OctoPrint dev dependencies - run: | - python -m pip install wheel --user - pip install octoprint[develop] - - name: ๐Ÿš€ Run flake8 - run: | - pre-commit run --hook-stage manual flake8 --all-files + pre-commit run --all-files --show-diff-on-failure test-install: name: ๐Ÿงช Installation tests @@ -134,7 +83,7 @@ jobs: runs-on: ubuntu-latest steps: - name: ๐Ÿ— Set up Python ${{ matrix.python }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - name: โฌ‡ Download build result