-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
- Loading branch information
1 parent
b7cb492
commit 913a01e
Showing
24 changed files
with
336 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.4 | ||
# keep in sync with .pre-commit-config.yaml | ||
- run: python -Im pip install --user ruff==0.6.4 | ||
|
||
- 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 |
Oops, something went wrong.