Skip to content

update Dockerfile for cuda 12.2 (#197) #767

update Dockerfile for cuda 12.2 (#197)

update Dockerfile for cuda 12.2 (#197) #767

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.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: conda-incubator/setup-miniconda@v2.0.0
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.12.2 \
conda-build \
networkx \
matplotlib=3.5.* \
junit-xml \
pytest=6.2.4 \
pytest-cov=2.12.1 \
pytest-mock=3.6.1
pip install yamllint==1.24.2
- name: Lint with pylint
shell: bash -l {0}
run: |
PYTHONPATH=./open_ce/:${PYTHONPATH} pylint ./open_ce ./open_ce/open-ce
- name: Lint git tools with pylint
shell: bash -l {0}
run: |
PYTHONPATH=./open_ce/:${PYTHONPATH} pylint ./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 \
./tests/*.py \
./tests/**/*.py
- name: Lint config files
shell: bash -l {0}
run: |
# Use yamllint to check the actual yaml files.
yamllint .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