Skip to content

Commit

Permalink
finishing
Browse files Browse the repository at this point in the history
  • Loading branch information
nadobando committed Sep 17, 2023
1 parent 8789021 commit 8960a48
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: CI

on:
Expand All @@ -11,7 +12,8 @@ on:

permissions:
checks: write

id-token: write
contents: write

jobs:
pre-commit:
Expand Down Expand Up @@ -61,9 +63,9 @@ jobs:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}

# Install dependencies. `--no-root` means "install all dependencies but not the project
# itself", which is what you want to avoid caching _your_ code. The `if` statement
# ensures this only runs on a cache miss.
# Install dependencies. `--no-root` means "install all dependencies but not the project
# itself", which is what you want to avoid caching _your_ code. The `if` statement
# ensures this only runs on a cache miss.
- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'
- run: poetry install --no-interaction
Expand Down Expand Up @@ -97,9 +99,7 @@ jobs:
- test
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write

steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -155,6 +155,7 @@ jobs:
if: needs.release.outputs.released == 'true'
concurrency: release
runs-on: ubuntu-latest

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
Expand All @@ -163,6 +164,7 @@ jobs:
path: dist/

- name: Publish package distributions to PyPI

uses: pypa/gh-action-pypi-publish@release/v1

- name: Publish package distributions to GitHub Releases
Expand Down
24 changes: 14 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
fail_fast: false
default_stages:
- commit
Expand Down Expand Up @@ -43,7 +44,7 @@ repos:
- id: python-check-blanket-noqa

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.287'
rev: v0.0.287
hooks:
- id: ruff
args:
Expand All @@ -61,7 +62,7 @@ repos:
- -c
- pyproject.toml
additional_dependencies:
- "bandit[toml]"
- bandit[toml]
- toml

- repo: https://github.com/pre-commit/mirrors-mypy
Expand All @@ -84,11 +85,14 @@ repos:
- --branch
- main


# - repo: https://github.com/python-poetry/poetry
# rev: '1.5.0'
# hooks:
# - id: poetry-check
# - id: poetry-lock
# args:
# - --no-update
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
args:
- --offset
- '2'
- --mapping
- '2'
- --sequence
- '4'

0 comments on commit 8960a48

Please sign in to comment.