Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub actions, unit tests and Pipenv support #47

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 120
28 changes: 28 additions & 0 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Black, Flake, Tests
on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install libgirepository1.0-dev
python -m pip install --upgrade pip
pip install pipenv
pipenv install --dev
- name: Run black
run: pipenv run black
- name: Run flake8
run: pipenv run flake
- name: Run tests
run: pipenv run test
22 changes: 22 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
PyGObject = "*"
requests = "*"
vdf = "*"

[dev-packages]
black = "*"
flake8-for-pycharm = "*"

[requires]
python_version = "3.12"

[scripts]
black = "black --check --line-length 120 . --verbose"
black_fix = "black --line-length 120 . --verbose"
flake = "flake8 . -v"
test = "python -m unittest -v"
Loading
Loading