Skip to content

mbarlow-rmi is running unit tests #11

mbarlow-rmi is running unit tests

mbarlow-rmi is running unit tests #11

Workflow file for this run

name: Run Tests and Coverage for OPGEE
run-name: ${{ github.actor }} is running unit tests
on:
push:
branches: ['feat/github-actions']
jobs:
test-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
env:
OPGEE_HOME: ${{ github.workspace }}/tests/files
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- name: Cache Conda dependencies
uses: actions/cache@v3
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkg_dirs
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{hashFiles('py3-opgee-linux.yml')}}
- name: Cache pip dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key:
${{ runner.os }}-pip-${{ hashFiles('requirements.txt')}}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: opgee
environment-file: py3-opgee-linux.yml
python-version: 3.9
use-only-tar-bz2: true
- run: |
python -m pip install .
pip install pytest-cov codecov coveralls PyYAML
- name: Run unit tests with coverate
run: coverage run --source=opgee -m pytest
- name: Code coverage report
if: ${{ success() }}
run: |
coveralls
bash <(curl -s https://codecov.io/bash)