Skip to content

Commit cf832f1

Browse files
authored
Add GitHub actions, unit tests and Pipenv support (#47)
1 parent 85e420a commit cf832f1

File tree

6 files changed

+446
-58
lines changed

6 files changed

+446
-58
lines changed

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
max-line-length = 120

.github/workflows/actions.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Black, Flake, Tests
2+
on: [push]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
python-version: ["3.12"]
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up Python ${{ matrix.python-version }}
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: ${{ matrix.python-version }}
17+
- name: Install dependencies
18+
run: |
19+
sudo apt-get install libgirepository1.0-dev
20+
python -m pip install --upgrade pip
21+
pip install pipenv
22+
pipenv install --dev
23+
- name: Run black
24+
run: pipenv run black
25+
- name: Run flake8
26+
run: pipenv run flake
27+
- name: Run tests
28+
run: pipenv run test

Pipfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
PyGObject = "*"
8+
requests = "*"
9+
vdf = "*"
10+
11+
[dev-packages]
12+
black = "*"
13+
flake8-for-pycharm = "*"
14+
15+
[requires]
16+
python_version = "3.12"
17+
18+
[scripts]
19+
black = "black --check --line-length 120 . --verbose"
20+
black_fix = "black --line-length 120 . --verbose"
21+
flake = "flake8 . -v"
22+
test = "python -m unittest -v"

0 commit comments

Comments
 (0)