Skip to content

Commit

Permalink
Merge pull request #145 from egh/github-actions
Browse files Browse the repository at this point in the history
Add github action for test
  • Loading branch information
egh authored Aug 22, 2024
2 parents 157c548 + 8904947 commit 7b8410d
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 5 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Python package

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt install -y ledger hledger
python -m pip install --upgrade pip
python -m pip install --upgrade poetry
python -m pip install flake8 pytest
poetry install --with=dev
- name: Lint with black
run: |
poetry run black --check .
- name: Test with pytest
run: |
poetry run python -m pytest
123 changes: 118 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ lxml = "5.2.2"

[tool.poetry.dev-dependencies]
pytest = "^8.2.2"
black = "*"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down

0 comments on commit 7b8410d

Please sign in to comment.