Skip to content

Commit

Permalink
[Update] ci/cd jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
neemiasbsilva committed Dec 30, 2024
1 parent 4dd448e commit d19319c
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 40 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/ci-lint-unit-test.yml
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/
40 changes: 0 additions & 40 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit d19319c

Please sign in to comment.