Skip to content

Commit 1da7202

Browse files
committed
Update ci workflows and add .editorconfig
1 parent cf3f14b commit 1da7202

File tree

4 files changed

+47
-9
lines changed

4 files changed

+47
-9
lines changed

Diff for: .editorconfig

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true

Diff for: .github/workflows/lint.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
run-linters:
7+
name: Run linters
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Check out Git repository
12+
uses: actions/checkout@v2
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.9
18+
19+
- name: Install Python dependencies
20+
run: pip install black flake8
21+
22+
- name: Run linters
23+
uses: wearerequired/lint-action@v1
24+
with:
25+
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
# Enable linters
27+
black: true
28+
flake8: true

Diff for: .github/workflows/test.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and lint with a single version of Python
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Flashlearn
4+
name: Flashlearn Tests
55

66
on:
77
push:
@@ -20,17 +20,19 @@ jobs:
2020
uses: actions/setup-python@v2
2121
with:
2222
python-version: 3.9
23+
2324
- name: Install dependencies
2425
run: |
2526
python -m pip install --upgrade pip
26-
pip install flake8 pytest
2727
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28-
- name: Lint with flake8
29-
run: |
30-
# stop the build if there are Python syntax errors or undefined names
31-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
32-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
33-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
28+
3429
- name: Test with pytest
3530
run: |
3631
pytest
32+
33+
- name: Coveralls
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
run: |
37+
pip install coveralls
38+
coveralls

Diff for: .gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ htmlcov
88
*.sqlite3
99
.vscode
1010
.pytest_cache
11-
.editorconfig
11+
#.editorconfig

0 commit comments

Comments
 (0)