Skip to content

finish I guess

finish I guess #1

Workflow file for this run

name ecovadis_assignment

Check failure on line 1 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 1
on
push
branches
- master
pull_request
branches
- master
jobs
codestyle
runs-on ubuntu-latest
if ${{ github.event_name == 'push' !github.event.pull_request.draft }}
steps
- uses actionscheckout@v4
- name Set up Python 3.10
uses actionssetup-python@v5
with
python-version 3.10
- name Install dependencies
run
python -m pip install --upgrade pip
python -m pip install black flake8
- name Code Style (BlackFlake8)
run
# Black code style
black --check --diff churn_pred tests setup.py
# Stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E901,E999,F821,F822,F823 --ignore=E266 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --ignore=E203,E266,E501,E721,E722,F401,F403,F405,F811,W503,C901 --statistics
test
runs-on ubuntu-latest
if ${{ github.event_name == 'push' !github.event.pull_request.draft }}
strategy
fail-fast true
matrix
python-version [3.9, 3.10, 3.11]
steps
- uses actionscheckout@v4
- name Set up Python ${{ matrix.python-version }}
uses actionssetup-python@v5
with
python-version ${{ matrix.python-version }}
- name Install dependencies
run
python -m pip install --upgrade pip
python -m pip install pytest-cov codecov .
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name Test with pytest
run
pytest --doctest-modules churn_pred --cov-report xml --cov-report term --disable-pytest-warnings --cov=churn_pred tests
- name Upload coverage
uses actionsupload-artifact@v4
with
name coverage${{ matrix.python-version }}
path .coverage
finish
needs test
runs-on ubuntu-latest
if ${{ github.event_name == 'push' !github.event.pull_request.draft }}
steps
- uses actionscheckout@v4
- name Set up Python 3.10
uses actionssetup-python@v5
with
python-version 3.10
- name Install dependencies
run
python -m pip install --upgrade pip
python -m pip install coverage
- name Download all artifacts
# Downloads coverage1, coverage2, etc.
uses actionsdownload-artifact@v4
- name Convert coverage
run
coverage combine coverage.coverage
# coverage report --fail-under=95
coverage xml
- name upload coverage to Codecov
uses codecovcodecov-action@v4
with
fail_ci_if_error true