Skip to content

Commit a9a4b5b

Browse files
committed
Adding initial CI/CD hook
* Adding .github/workflows dir with a CI YAML file
1 parent f2efc76 commit a9a4b5b

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
push:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
python-version: [3.8]
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install flake8 black
31+
32+
- name: Lint with Flake8
33+
run: |
34+
flake8 git_py_stats
35+
36+
- name: Check formatting with Black
37+
run: |
38+
black --check git_py_stats
39+
40+
- name: Run tests
41+
run: |
42+
cd git-py-stats
43+
python -m unittest discover -s git_py_stats/tests
44+

0 commit comments

Comments
 (0)