diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 00dc37b..ac04be8 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -49,7 +49,10 @@ jobs: - name: Install dependencies if: steps.cache_venv.outputs.cache-hit != 'true' run: | - python -m pip install --upgrade pip + if [ -d "venv" ]; then rm -rf venv; fi + python3 -m venv venv + source venv/bin/activate + pip install --upgrade pip pip install flake8 black isort pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: "Lint with black" @@ -58,9 +61,11 @@ jobs: black ./routingfilter --config .github/configurations/python_linters/.black --check --diff - name: Lint with flake8 run: | + source venv/bin/activate flake8 ./routingfilter --config .github/configurations/python_linters/.flake8 --show-source - name: "Isort check" run: | + source venv/bin/activate isort ./buffalogs --sp .github/configurations/python_linters/.isort.cfg --profile black --filter-files --check-only --diff - name: Test with pytest run: |