Skip to content

Commit

Permalink
CI: add linting and formatting checks
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesBelveze committed Jul 5, 2023
1 parent 73418f2 commit 1247ed2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: build

on:
Expand Down Expand Up @@ -44,6 +41,14 @@ jobs:
run: |
poetry install --with dev
- name: Check linting
run: |
poetry run task lint
- name: Check formatting
run: |
poetry run task is-formatted
- name: Test with pytest
run: |
poetry run task force-cpu-torch
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ flake8 = "<6.0.0"
test = "pytest tests/*"
lint = "flake8 --max-line-length 90 --ignore=E203,E501,W503 --per-file-ignores='__init__.py:F401' langtest/"
format = "black langtest/ tests/"
is-formatted = "black --check langtest/ tests/"
force-cpu-torch = "python -m pip install torch --index-url https://download.pytorch.org/whl/cpu"


Expand Down

0 comments on commit 1247ed2

Please sign in to comment.