Skip to content

mbarlow-rmi is running unit tests #15

mbarlow-rmi is running unit tests

mbarlow-rmi is running unit tests #15

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
defaults:
run:
shell: bash -el {0}
env:
HOME: ${{ github.workspace }}
CI: 'true'
steps:
- uses: actions/checkout@v4
- 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: Init opgee conda env
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: opgee
python-version: 3.9
- name: Opgee resolved env cache key
id: opgee-env-key
run: |
ENV_HASH=$(conda list --explicit | sha256sum | cut -d ' ' -f 1)
echo "opgee_hash=$ENV_HASH" >> $GITHUB_OUTPUT
- name: Cache Conda env
id: opgee-env-cache
uses: actions/cache@v3
env:
# increment cache number to invalidate and rebuild the env
CACHE_NUMBER: 0
with:
path: ${{ env.CONDA }}/envs
key:
${{ runner.os }}-conda-${{ runner.arch }}-${{ hashFiles("py3-opgee-gh-actions.yml") }}-${{ env.CACHE_NUMBER }}

Check failure on line 48 in .github/workflows/opgee-test.yml

View workflow run for this annotation

GitHub Actions / Run Tests and Coverage for OPGEE

Invalid workflow file

The workflow is not valid. .github/workflows/opgee-test.yml (Line: 48, Col: 11): Unexpected symbol: '"py3-opgee-gh-actions'. Located at position 11 within expression: hashFiles("py3-opgee-gh-actions.yml")
- name: Update Conda env
run: |
conda env update -n opgee -f py3-opgee-gh-actions.yml
if: steps.opgee-env-cache.outputs.cache-hit != '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)