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

[pre-commit.ci] pre-commit autoupdate #817

Closed
wants to merge 2 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
56 changes: 28 additions & 28 deletions .github/workflows/nigthly-tests.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
name: Nightly Wagtail test

on:
schedule:
# Nightly at 4am.
- cron: '0 4 * * *'
schedule:
# Nightly at 4am.
- cron: '0 4 * * *'

workflow_dispatch:
workflow_dispatch:

jobs:
nightly-test:
# Cannot check the existence of secrets, so limiting to repository name to prevent all forks to run nightly.
# See: https://github.com/actions/runner/issues/520
if: ${{ github.repository == 'wagtail/wagtail-localize' }}
runs-on: ubuntu-latest
nightly-test:
# Cannot check the existence of secrets, so limiting to repository name to prevent all forks to run nightly.
# See: https://github.com/actions/runner/issues/520
if: ${{ github.repository == 'wagtail/wagtail-localize' }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip tox
- name: Test
id: test
continue-on-error: true
run: tox -e wagtailmain
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip tox
- name: Test
id: test
continue-on-error: true
run: tox -e wagtailmain

- name: Send Slack notification on failure
if: steps.test.outcome == 'failure'
run: |
python .github/scripts/report_nightly_build_failure.py
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Send Slack notification on failure
if: steps.test.outcome == 'failure'
run: |
python .github/scripts/report_nightly_build_failure.py
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
114 changes: 57 additions & 57 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
name: Publish to PyPI

on:
release:
types: [published]
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read # to fetch code (actions/checkout)
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Install Node dependencies
run: npm ci

- name: Build static files
run: ./node_modules/.bin/webpack --mode production

- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'

- name: ⬇️ Install build dependencies
run: |
python -m pip install -U flit

- name: 🏗️ Build
run: python -m flit build

- uses: actions/upload-artifact@v4
with:
path: ./dist

# https://docs.pypi.org/trusted-publishers/using-a-publisher/
pypi-publish:
needs: build
environment: 'publish'

name: ⬆️ Upload release to PyPI
runs-on: ubuntu-latest
permissions:
# Mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v4

- name: 🚀 Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: artifact/
print-hash: true
build:
runs-on: ubuntu-latest
permissions:
contents: read # to fetch code (actions/checkout)
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Install Node dependencies
run: npm ci

- name: Build static files
run: ./node_modules/.bin/webpack --mode production

- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'

- name: ⬇️ Install build dependencies
run: |
python -m pip install -U flit

- name: 🏗️ Build
run: python -m flit build

- uses: actions/upload-artifact@v4
with:
path: ./dist

# https://docs.pypi.org/trusted-publishers/using-a-publisher/
pypi-publish:
needs: build
environment: 'publish'

name: ⬆️ Upload release to PyPI
runs-on: ubuntu-latest
permissions:
# Mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v4

- name: 🚀 Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: artifact/
print-hash: true
30 changes: 15 additions & 15 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: Ruff

on:
push:
branches:
- main
- 'stable/**'
pull_request:
branches: [main]
push:
branches:
- main
- 'stable/**'
pull_request:
branches: [main]

jobs:
ruff:
runs-on: ubuntu-latest
ruff:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
steps:
- uses: actions/checkout@v4

# keep in sync with .pre-commit-config.yaml
- run: python -Im pip install --user ruff==0.6.1
# keep in sync with .pre-commit-config.yaml
- run: python -Im pip install --user ruff==0.6.1

- name: Run ruff
working-directory: .
run: ruff check --output-format=github wagtail_localize
- name: Run ruff
working-directory: .
run: ruff check --output-format=github wagtail_localize
Loading
Loading