Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump piped from 05de4b9 to 9b31ec1 #972

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/actions/setup-py/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Install Python"
description: "Install a specific Python version"
inputs:
python-version:
description: "Python version to install"
required: false
default: "3.11"
runs:
using: composite
steps:
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
id: install-py
with:
python-version: ${{ inputs.python-version }}

- name: Install Nox
run: pipx install nox --python "${{ steps.install-py.outputs.python-path }}"
shell: bash
15 changes: 4 additions & 11 deletions .github/workflows/freeze-for-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,16 @@ jobs:
with:
submodules: "true"

- name: Set up Python 3.11
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: "3.11"

- name: install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt
- name: Install Python
uses: ./.github/actions/setup-py

- name: Upgrade dependency locks
run: python -m nox -s freeze-locks bot-package-diff
run: nox -s freeze-locks bot-package-diff

- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: gogo.patch
path: gogo.patch

- name: Check diff file
run: python -m nox -s is-diff-file-empty
run: nox -s is-diff-file-empty
19 changes: 6 additions & 13 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,17 @@ jobs:
with:
submodules: "true"

- name: Set up Python 3.11
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: "3.11"

- name: install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt
- name: Install Python
uses: ./.github/actions/setup-py

- name: Lint markup
run: python -m nox -s verify-markup
run: nox -s verify-markup

- name: Check spelling
run: python -m nox -s spell-check
run: nox -s spell-check

- name: Lint with flake8
run: python -m nox -s flake8
run: nox -s flake8

- name: Check slotting
run: python -m nox -s slot-check
run: nox -s slot-check
15 changes: 3 additions & 12 deletions .github/workflows/pr-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,14 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
submodules: "true"

- name: Set up Python 3.11
if: github.event.action != 'closed'
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: "3.11"

- name: install prerequisites
if: github.event.action != 'closed'
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt
- name: Install Python
uses: ./.github/actions/setup-py

- name: Build docs
if: github.event.action != 'closed'
run: |
mkdir site
python -m nox -s generate-docs -- -o ./site
nox -s generate-docs -- -o ./site

- name: Deploy preview
uses: FasterSpeeding/pr-preview-action@task/override-committer
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,11 @@ jobs:
with:
submodules: "true"

- name: Set up Python 3.11
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: "3.11"
- name: Install Python
uses: ./.github/actions/setup-py

- name: Build project
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt
python -m nox -s build
run: nox -s build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc
26 changes: 6 additions & 20 deletions .github/workflows/py-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,13 @@ jobs:
with:
submodules: "true"

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
- name: Install Python
uses: ./.github/actions/setup-py
with:
python-version: ${{ matrix.python-version }}

- name: install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt

- name: Run tests
run: |
python -m nox -s test
run: nox -s test

# TODO: Could we switch over to gather coverage from the normal test runs and combining
# the result once https://github.com/nedbat/coveragepy/issues/1002 is fixed?
Expand All @@ -55,19 +49,11 @@ jobs:
with:
submodules: "true"

- name: Set up Python 3.11
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: "3.11"

- name: install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt
- name: Install Python
uses: ./.github/actions/setup-py

- name: Record coverage
run: |
python -m nox -s test-coverage
run: nox -s test-coverage

- name: Upload coverage
uses: paambaati/codeclimate-action@f429536ee076d758a24705203199548125a28ca7
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/reformat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,16 @@ jobs:
with:
submodules: "true"

- name: Set up Python 3.11
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: "3.11"

- name: install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt
- name: Install Python
uses: ./.github/actions/setup-py

- name: Reformat
run: python -m nox -s reformat bot-package-diff
run: nox -s reformat bot-package-diff

- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: gogo.patch
path: gogo.patch

- name: Check diff file
run: python -m nox -s is-diff-file-empty
run: nox -s is-diff-file-empty
13 changes: 3 additions & 10 deletions .github/workflows/release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,14 @@ jobs:
with:
submodules: "true"

- name: Set up Python 3.11
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: "3.11"

- name: Install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt
- name: Install Python
uses: ./.github/actions/setup-py

- name: Build docs
id: doc_info
run: |
mkdir site
python -m nox -s generate-docs -- -o ./site -j
nox -s generate-docs -- -o ./site -j
echo "GIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_STATE

- name: Push
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/resync-piped.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,16 @@ jobs:
with:
submodules: "true"

- name: Set up Python 3.11
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: "3.11"

- name: install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt
- name: Install Python
uses: ./.github/actions/setup-py

- name: Resync Piped
run: python -m nox -s copy-piped bot-package-diff
run: nox -s copy-piped bot-package-diff

- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: gogo.patch
path: gogo.patch

- name: Check diff file
run: python -m nox -s is-diff-file-empty
run: nox -s is-diff-file-empty
13 changes: 3 additions & 10 deletions .github/workflows/type-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,8 @@ jobs:
with:
submodules: "true"

- name: Set up Python 3.11
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: "3.11"

- name: install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt
- name: Install Python
uses: ./.github/actions/setup-py

- name: Run type checker
run: python -m nox -s type-check
run: nox -s type-check
13 changes: 3 additions & 10 deletions .github/workflows/update-licence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,11 @@ jobs:
with:
submodules: "true"

- name: Set up Python 3.11
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: "3.11"

- name: install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt
- name: Install Python
uses: ./.github/actions/setup-py

- name: Update licence
run: python -m nox -s update-licence
run: nox -s update-licence

- name: Create Pull Request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/upgrade-locks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,11 @@ jobs:
with:
submodules: "true"

- name: Set up Python 3.11
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: "3.11"

- name: install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt
- name: Install Python
uses: ./.github/actions/setup-py

- name: Upgrade dependency locks
run: python -m nox -s freeze-locks
run: nox -s freeze-locks

- name: Create Pull Request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/verify-locks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,8 @@ jobs:
with:
submodules: "true"

- name: Set up Python 3.11
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: "3.11"

- name: install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt
- name: Install Python
uses: ./.github/actions/setup-py

- name: Verify dependency locks
run: python -m nox -s verify-deps
run: nox -s verify-deps
13 changes: 3 additions & 10 deletions .github/workflows/verify-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,8 @@ jobs:
with:
submodules: "true"

- name: Set up Python 3.11
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: "3.11"

- name: install prerequisites
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r ./piped/python/base-requirements/nox.txt
- name: Install Python
uses: ./.github/actions/setup-py

- name: Run verify types
run: python -m nox -s verify-types
run: nox -s verify-types
Loading
Loading