Skip to content

Commit be264b5

Browse files
Jade WibbelsJade Wibbels
authored andcommitted
add github actions lint and test
1 parent 038c603 commit be264b5

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
services:
16+
docker:
17+
image: docker:19.03.12
18+
options: --privileged
19+
ports:
20+
- 8000:8000
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v2
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: 3.9
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m venv venv
34+
source venv/bin/activate
35+
pip install -r requirements.txt
36+
pip install black flake8 pytest
37+
38+
- name: Lint with flake8
39+
run: |
40+
source venv/bin/activate
41+
flake8 .
42+
43+
- name: Format with black
44+
run: |
45+
source venv/bin/activate
46+
black --check .
47+
48+
- name: Run tests
49+
run: |
50+
source venv/bin/activate
51+
pytest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ venv/
129129
ENV/
130130
env.bak/
131131
venv.bak/
132+
.vscode/
132133

133134
# Spyder project settings
134135
.spyderproject

setup.cfg

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

0 commit comments

Comments
 (0)