Skip to content

Commit 9f24736

Browse files
committed
Update Github Actions
- Introduce requirements file - Add Makefile
1 parent 39da919 commit 9f24736

6 files changed

Lines changed: 27 additions & 98 deletions

File tree

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: monthly

.github/workflows/tests.yml

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run tests
1+
name: CI
22

33
on:
44
push:
@@ -7,35 +7,18 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
build:
11-
10+
gitHubActionForPytest:
1211
runs-on: ubuntu-latest
1312
strategy:
1413
matrix:
15-
python_version: [3.6, 3.7, 3.8]
16-
14+
python-version: [3.9, 3.10]
15+
name: GitHub Action
1716
steps:
18-
- uses: actions/checkout@v2
19-
- name: Set up Python
20-
uses: actions/setup-python@v2
21-
with:
22-
python-version: ${{ matrix.python_version }}
17+
- name: Checkout
18+
uses: actions/checkout@v6
2319
- name: Install dependencies
2420
run: |
25-
python -V
26-
printenv
27-
python -m pip install --upgrade pip
28-
pip install flake8 pytest coverage pyfakefs pytest-cov
29-
- name: Lint with flake8
30-
run: |
31-
# stop the build if there are Python syntax errors or undefined names
32-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
33-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
34-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
35-
- name: Test with pytest
21+
python -m pip install -r requirements-dev.txt
22+
- name: Test and coverate
3623
run: |
37-
pytest --cov=check_docker --cov-fail-under 90 --cov-report term --cov-report html
38-
- uses: actions/upload-artifact@v2
39-
with:
40-
name: coverage_report
41-
path: htmlcov
24+
make coverage

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.PHONY: lint test
2+
3+
lint:
4+
python -m pylint check_docker/
5+
test:
6+
py.test -v
7+
coverage:
8+
py.test --cov=check_docker

Pipfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

requirements-dev.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
pylint==4.0.4
2+
pytest==9.0.2
3+
pytest-cov==7.0.0
4+
pyfakefs==6.0.0

tests/test_version.py

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)