Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
move CI steps to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh committed Apr 17, 2020
1 parent 16d3b25 commit 28fb219
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,21 @@ jobs:
pip install --upgrade -r <(grep -Ev '^allennlp$' requirements.txt)
pip install --upgrade -r dev-requirements.txt
- name: Show pip freeze
run: |
pip freeze
- name: Lint
run: |
flake8 -v
black -v --check .
make lint
- name: Type check
run: |
mypy allennlp_models --ignore-missing-imports --no-strict-optional --no-site-packages
make typecheck
- name: Run tests
run: |
pytest --cov=allennlp_models/ --cov-report=xml
make test-with-cov
- name: Upload coverage to Codecov
if: matrix.python == '3.7'
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@ jobs:
- name: Lint
run: |
flake8 -v
black -v --check .
make lint
- name: Type check
run: |
mypy allennlp_models --ignore-missing-imports --no-strict-optional --no-site-packages
make typecheck
- name: Run tests
run: |
pytest -v
make test
- name: Build Package
run: |
Expand Down
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.PHONY : lint
lint :
flake8 -v
black -v --check .

.PHONY : typecheck
typecheck :
mypy allennlp_models --ignore-missing-imports --no-strict-optional --no-site-packages

.PHONY : test
test :
pytest -v --color=yes

.PHONY : test-with-cov
test-with-cov :
pytest -v --color=yes --cov=allennlp_models/ --cov-report=xml

0 comments on commit 28fb219

Please sign in to comment.