-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4dd448e
commit d19319c
Showing
2 changed files
with
83 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Run Unit Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
|
||
jobs: | ||
ruff: | ||
name: Run Ruff | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install dependencies for Ruff | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
- name: Run Ruff Linting | ||
run: | | ||
ruff check src | ||
ruff check src --fix | ||
pylint: | ||
name: Run pylint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install dependencies for pylint | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pylint | ||
- name: Run pylint with fail-under | ||
run: | | ||
pylint src --rcfile=.pylintrc --fail-under=10 | ||
pytest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Install pytest dependencie | ||
run: | | ||
pip install pytest | ||
pip install pytest-cov | ||
- name: Set PYTHONPATH for the tests | ||
run: | | ||
echo "PYTHONPATH=$(pwd)/src" >> $GITHUB_ENV | ||
- name: Run unit test with pytest | ||
run: | | ||
pytest --cov=src/toxic_comment_classification_kedro tests/ |
This file was deleted.
Oops, something went wrong.