Skip to content

Commit

Permalink
👷Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
7rikazhexde committed Jan 11, 2025
1 parent 30ed348 commit 3f98567
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/update-requirements-after-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
python-version: '3.13'
- name: Install Poetry
run: pip install poetry
- name: Install dependencies
run: poetry install
- name: Add plugin
run: poetry self add poetry-plugin-export
- name: Install dependencies
run: poetry install
- name: Update requirements files
run: |
poetry export -f requirements.txt -o requirements.txt --without-hashes
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update_pre-commit_hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
python-version: '3.13'
- name: Install poetry
run: pip install poetry
- name: Add plugin
run: poetry self add poetry-plugin-export
- name: Cache dependencies
uses: actions/[email protected]
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install
- name: Add plugin
run: poetry self add poetry-plugin-export

# Update pre-commit hooks and check for changes
- name: Update pre-commit hooks
Expand Down
25 changes: 18 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,25 @@ repos:
verbose: true
- id: poetry-lock
verbose: true

- repo: local
hooks:
- id: poetry-export
args: ["-f", "requirements.txt", "-o", "requirements.txt", "--without-hashes"]
verbose: true
files: ^pyproject\.toml$
- id: poetry-export
args: ["--with", "dev", "-f", "requirements.txt", "-o", "requirements-dev.txt", "--without-hashes"]
verbose: true
files: ^pyproject\.toml$
name: Export requirements.txt
entry: poetry export -f requirements.txt -o requirements.txt --without-hashes
language: python
pass_filenames: false
additional_dependencies:
- "poetry"
- "poetry-plugin-export"
- id: poetry-export-dev
name: Export dev requirements.txt
entry: poetry export --with dev -f requirements.txt -o requirements-dev.txt --without-hashes
language: python
pass_filenames: false
additional_dependencies:
- "poetry"
- "poetry-plugin-export"

# Reference: https://github.com/DavidAnson/markdownlint-cli2#overview
# > markdownlint-cli is a traditional command-line interface for markdownlint.
Expand Down

0 comments on commit 3f98567

Please sign in to comment.