Skip to content

Updated README.md

Updated README.md #873

name: Open-CE Builder Unit Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: conda-incubator/[email protected]
with:
auto-update-conda: false
python-version: ${{ matrix.python-version }}
- name: Ensure open-ce can load without conda-build
shell: bash -l {0}
run: |
pip install -e .
conda install -y pyyaml jinja2 networkx
open-ce -h
- name: Install dependencies
shell: bash -l {0}
run: |
conda install -y pylint=2.16.2 \
conda-build \
networkx \
matplotlib=3.7.* \
junit-xml \
pytest=7.4.0 \
pytest-cov=4.0.0 \
pytest-mock=3.10.0 \
setuptools=65.6.3
pip install yamllint==1.24.2
- name: Lint with pylint
shell: bash -l {0}
run: |
PYTHONPATH=./open_ce/:${PYTHONPATH} pylint --disable=unnecessary-lambda-assignment ./open_ce ./open_ce/open-ce
- name: Lint git tools with pylint
shell: bash -l {0}
run: |
PYTHONPATH=./open_ce/:${PYTHONPATH} pylint --disable=unnecessary-lambda-assignment ./git_tools/*.py
- name: Lint all test files for warnings and errors only
shell: bash -l {0}
run: |
PYTHONPATH=./open_ce/:./tests/:${PYTHONPATH} \
pylint \
--disable=R,C,protected-access,unnecessary-lambda-assignment \
./tests/*.py \
./tests/**/*.py
- name: Lint config files
shell: bash -l {0}
run: |
# Use yamllint to check the actual yaml files.
yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" .github/workflows/*.yml
- name: Test with pytest and Generate coverage report
shell: bash -l {0}
run: |
pip install -e .
pytest tests/
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v1
#with:
#file: ./coverage.xml
#directory: ./
#flags: unittests
#env_vars: OS,PYTHON
#name: codecov-umbrella
#fail_ci_if_error: true
#path_to_write_report: ./codecov_report.gz