Skip to content

Commit 913a01e

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b7cb492 commit 913a01e

File tree

24 files changed

+336
-336
lines changed

24 files changed

+336
-336
lines changed

.github/workflows/nigthly-tests.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
name: Nightly Wagtail test
22

33
on:
4-
schedule:
5-
# Nightly at 4am.
6-
- cron: '0 4 * * *'
4+
schedule:
5+
# Nightly at 4am.
6+
- cron: '0 4 * * *'
77

8-
workflow_dispatch:
8+
workflow_dispatch:
99

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

17-
steps:
18-
- uses: actions/checkout@v4
19-
- name: Set up Python 3.12
20-
uses: actions/setup-python@v5
21-
with:
22-
python-version: '3.12'
23-
- name: Install dependencies
24-
run: |
25-
python -m pip install --upgrade pip tox
26-
- name: Test
27-
id: test
28-
continue-on-error: true
29-
run: tox -e wagtailmain
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Set up Python 3.12
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.12'
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip tox
26+
- name: Test
27+
id: test
28+
continue-on-error: true
29+
run: tox -e wagtailmain
3030

31-
- name: Send Slack notification on failure
32-
if: steps.test.outcome == 'failure'
33-
run: |
34-
python .github/scripts/report_nightly_build_failure.py
35-
env:
36-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
31+
- name: Send Slack notification on failure
32+
if: steps.test.outcome == 'failure'
33+
run: |
34+
python .github/scripts/report_nightly_build_failure.py
35+
env:
36+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

.github/workflows/publish.yml

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
11
name: Publish to PyPI
22

33
on:
4-
release:
5-
types: [published]
4+
release:
5+
types: [published]
66

77
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
permissions:
11-
contents: read # to fetch code (actions/checkout)
12-
steps:
13-
- uses: actions/checkout@v4
14-
with:
15-
fetch-depth: 0
16-
17-
- name: Set up Node
18-
uses: actions/setup-node@v4
19-
with:
20-
node-version-file: '.nvmrc'
21-
22-
- name: Install Node dependencies
23-
run: npm ci
24-
25-
- name: Build static files
26-
run: ./node_modules/.bin/webpack --mode production
27-
28-
- uses: actions/setup-python@v5
29-
with:
30-
python-version: '3.12'
31-
cache: 'pip'
32-
cache-dependency-path: '**/pyproject.toml'
33-
34-
- name: ⬇️ Install build dependencies
35-
run: |
36-
python -m pip install -U flit
37-
38-
- name: 🏗️ Build
39-
run: python -m flit build
40-
41-
- uses: actions/upload-artifact@v4
42-
with:
43-
path: ./dist
44-
45-
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
46-
pypi-publish:
47-
needs: build
48-
environment: 'publish'
49-
50-
name: ⬆️ Upload release to PyPI
51-
runs-on: ubuntu-latest
52-
permissions:
53-
# Mandatory for trusted publishing
54-
id-token: write
55-
steps:
56-
- uses: actions/download-artifact@v4
57-
58-
- name: 🚀 Publish package distributions to PyPI
59-
uses: pypa/gh-action-pypi-publish@release/v1
60-
with:
61-
packages-dir: artifact/
62-
print-hash: true
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read # to fetch code (actions/checkout)
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Set up Node
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version-file: '.nvmrc'
21+
22+
- name: Install Node dependencies
23+
run: npm ci
24+
25+
- name: Build static files
26+
run: ./node_modules/.bin/webpack --mode production
27+
28+
- uses: actions/setup-python@v5
29+
with:
30+
python-version: '3.12'
31+
cache: 'pip'
32+
cache-dependency-path: '**/pyproject.toml'
33+
34+
- name: ⬇️ Install build dependencies
35+
run: |
36+
python -m pip install -U flit
37+
38+
- name: 🏗️ Build
39+
run: python -m flit build
40+
41+
- uses: actions/upload-artifact@v4
42+
with:
43+
path: ./dist
44+
45+
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
46+
pypi-publish:
47+
needs: build
48+
environment: 'publish'
49+
50+
name: ⬆️ Upload release to PyPI
51+
runs-on: ubuntu-latest
52+
permissions:
53+
# Mandatory for trusted publishing
54+
id-token: write
55+
steps:
56+
- uses: actions/download-artifact@v4
57+
58+
- name: 🚀 Publish package distributions to PyPI
59+
uses: pypa/gh-action-pypi-publish@release/v1
60+
with:
61+
packages-dir: artifact/
62+
print-hash: true

.github/workflows/ruff.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
name: Ruff
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
- 'stable/**'
8-
pull_request:
9-
branches: [main]
4+
push:
5+
branches:
6+
- main
7+
- 'stable/**'
8+
pull_request:
9+
branches: [main]
1010

1111
jobs:
12-
ruff:
13-
runs-on: ubuntu-latest
12+
ruff:
13+
runs-on: ubuntu-latest
1414

15-
steps:
16-
- uses: actions/checkout@v4
15+
steps:
16+
- uses: actions/checkout@v4
1717

18-
# keep in sync with .pre-commit-config.yaml
19-
- run: python -Im pip install --user ruff==0.6.4
18+
# keep in sync with .pre-commit-config.yaml
19+
- run: python -Im pip install --user ruff==0.6.4
2020

21-
- name: Run ruff
22-
working-directory: .
23-
run: ruff check --output-format=github wagtail_localize
21+
- name: Run ruff
22+
working-directory: .
23+
run: ruff check --output-format=github wagtail_localize

0 commit comments

Comments
 (0)