Skip to content

Commit

Permalink
Dependabot compatible package (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
codecakes authored Aug 7, 2024
1 parent 7a477aa commit c2fbd64
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 91 deletions.
11 changes: 11 additions & 0 deletions .github/actions/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: "Installable Python Packages"
description: "Reusable composite action to install packages."
runs:
using: "composite"
steps:
- name: Install dependencies
shell: bash
run: |
python3 -m pip install --upgrade pip
pip install poetry
make pip-install
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

version: 2
updates:
- package-ecosystem: "poetry" # See documentation for possible values
- package-ecosystem: "pip"
directory: "/" # Location of package manifests
schedule:
interval: "daily"
Expand Down
29 changes: 18 additions & 11 deletions .github/workflows/stage_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,30 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.12'

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install poetry
poetry install --no-root --with=dev
- name: Run Pre-commit
run: |
poetry run pre-commit run --all-files
- name: Run Composite Action to Install Packages
uses: ./.github/actions

- name: Run tests
run: |
poetry run pytest
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3

- name: Run Composite Action to Install Packages
uses: ./.github/actions

- name: Run Pre-commit
run: |
poetry install --no-root --all-extras
poetry run pre-commit run --all-files
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ check:

run:
@bash run.sh

install:
@bash install.sh

pip-install:
pip install --prefer-binary --use-pep517 --check-build-dependencies .[dev]
3 changes: 3 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

poetry install --no-root --all-extras
Loading

0 comments on commit c2fbd64

Please sign in to comment.