Skip to content

Commit

Permalink
Chore: pre-commit autoupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Nov 21, 2023
1 parent 6901034 commit 294ff22
Show file tree
Hide file tree
Showing 8 changed files with 1,820 additions and 1,822 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: "3.8"

- name: "Install dependencies"
run: |
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: '🐍📦 Production build and release'
name: "🐍📦 Production build and release"

# GitHub/PyPI trusted publisher documentation:
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
Expand All @@ -13,45 +13,45 @@ on:
- v*.*.*

env:
python-version: '3.10'
python-version: "3.10"

### BUILD ###

jobs:
build:
name: '🐍 Build packages'
name: "🐍 Build packages"
runs-on: ubuntu-latest
permissions:
# IMPORTANT: mandatory for Sigstore
id-token: write
steps:
### BUILDING ###

- name: 'Checkout repository'
- name: "Checkout repository"
uses: actions/checkout@v4

- name: 'Setup PDM for build commands'
- name: "Setup PDM for build commands"
uses: pdm-project/setup-pdm@v3
with:
version: 2.10.0

- name: 'Setup Python 3.10'
- name: "Setup Python 3.10"
uses: actions/[email protected]
with:
python-version: ${{ env.python-version }}

- name: 'Update version from tags for production release'
- name: "Update version from tags for production release"
run: |
echo "Github versioning: ${{ github.ref_name }}"
scripts/release-versioning.sh
- name: 'Build with PDM backend'
- name: "Build with PDM backend"
run: |
pdm build
### SIGNING ###

- name: 'Sign packages with Sigstore'
- name: "Sign packages with Sigstore"
uses: sigstore/[email protected]
with:
inputs: >-
Expand All @@ -67,7 +67,7 @@ jobs:
### PUBLISH GITHUB ###

github:
name: '📦 Publish to GitHub'
name: "📦 Publish to GitHub"
# Only publish on tag pushes
if: startsWith(github.ref, 'refs/tags/')
needs:
Expand All @@ -77,13 +77,13 @@ jobs:
# IMPORTANT: mandatory to publish artefacts
contents: write
steps:
- name: '⬇ Download build artefacts'
- name: "⬇ Download build artefacts"
uses: actions/download-artifact@v3
with:
name: ${{ github.ref_name }}
path: dist/

- name: '📦 Publish release to GitHub'
- name: "📦 Publish release to GitHub"
uses: ModeSevenIndustrialSolutions/action-automatic-releases@latest
with:
# Valid inputs are:
Expand All @@ -99,7 +99,7 @@ jobs:
### PUBLISH PYPI TEST ###

testpypi:
name: '📦 Publish to PyPi Test'
name: "📦 Publish to PyPi Test"
# Only publish on tag pushes
if: startsWith(github.ref, 'refs/tags/')
needs:
Expand All @@ -111,13 +111,13 @@ jobs:
# IMPORTANT: mandatory for trusted publishing
id-token: write
steps:
- name: '⬇ Download build artefacts'
- name: "⬇ Download build artefacts"
uses: actions/download-artifact@v3
with:
name: ${{ github.ref_name }}
path: dist/

- name: 'Remove files unsupported by PyPi'
- name: "Remove files unsupported by PyPi"
run: |
if [ -f dist/buildvars.txt ]; then
rm dist/buildvars.txt
Expand All @@ -133,7 +133,7 @@ jobs:
### PUBLISH PYPI ###

pypi:
name: '📦 Publish to PyPi'
name: "📦 Publish to PyPi"
# Only publish on tag pushes
if: startsWith(github.ref, 'refs/tags/')
needs:
Expand All @@ -145,23 +145,23 @@ jobs:
# IMPORTANT: mandatory for trusted publishing
id-token: write
steps:
- name: '⬇ Download build artefacts'
- name: "⬇ Download build artefacts"
uses: actions/download-artifact@v3
with:
name: ${{ github.ref_name }}
path: dist/

- name: 'Remove files unsupported by PyPi'
- name: "Remove files unsupported by PyPi"
run: |
if [ -f dist/buildvars.txt ]; then
rm dist/buildvars.txt
fi
rm dist/*.crt dist/*.sig*
- name: 'Setup PDM for build commands'
- name: "Setup PDM for build commands"
uses: pdm-project/setup-pdm@v3

- name: 'Publish release to PyPI'
- name: "Publish release to PyPI"
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
python-version: "3.x"

- name: "Install dependencies"
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
name: "Run tests, build and push image"

env:
APP_NAME: 'physrisk-api'
IMAGE_REGISTRY: 'quay.io/os-climate'
IMAGE_TAGS: ''
APP_NAME: "physrisk-api"
IMAGE_REGISTRY: "quay.io/os-climate"
IMAGE_TAGS: ""

# yamllint disable-line rule:truthy
on:
Expand Down
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
ci:
autofix_commit_msg: 'Chore: pre-commit autoupdate'
autofix_commit_msg: "Chore: pre-commit autoupdate"
skip:
# pre-commit.ci cannot install WGET, so tomlint must be disabled
- tomllint
Expand All @@ -17,7 +17,7 @@ repos:
- repo: local
hooks:
- id: tomllint
name: 'Script: scripts/tomllint.sh'
name: "Script: scripts/tomllint.sh"
language: script
# pass_filenames: false
files: \^*.toml
Expand Down Expand Up @@ -45,7 +45,7 @@ repos:
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
args: ['--fix=lf']
args: ["--fix=lf"]
- id: name-tests-test
# Do not allow direct push to main/master branches
- id: no-commit-to-branch
Expand All @@ -59,14 +59,14 @@ repos:
hooks:
- id: prettier
args:
['--ignore-unknown', '--no-error-on-unmatched-pattern', '!chart/**']
["--ignore-unknown", "--no-error-on-unmatched-pattern", "!chart/**"]

# Lint: Markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.37.0
hooks:
- id: markdownlint
args: ['--fix']
args: ["--fix"]

# - repo: https://github.com/asottile/pyupgrade
# rev: v3.15.0
Expand All @@ -93,7 +93,7 @@ repos:
rev: 2.1.1
hooks:
- id: bashate
args: ['--ignore=E006']
args: ["--ignore=E006"]

- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.9.0
Expand Down Expand Up @@ -137,7 +137,7 @@ repos:
# additional_dependencies: [black]

- repo: https://github.com/pycqa/flake8
rev: '6.1.0'
rev: "6.1.0"
hooks:
- id: flake8

Expand All @@ -148,14 +148,14 @@ repos:
# - id: codespell

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.6.1'
rev: "v1.6.1"
hooks:
- id: mypy

- repo: local
hooks:
- id: pip-audit
name: 'Script: scripts/pipaudit.sh'
name: "Script: scripts/pipaudit.sh"
language: script
# pass_filenames: false
entry: scripts/pipaudit.sh
4 changes: 2 additions & 2 deletions .thoth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ runtime_environments:
- name: default
operating_system:
name: ubi
version: '8'
python_version: '3.8'
version: "8"
python_version: "3.8"
recommendation_type: latest

managers:
Expand Down
Loading

0 comments on commit 294ff22

Please sign in to comment.