Skip to content

Update environment information #324

Update environment information

Update environment information #324

Workflow file for this run

name: Unit Tests
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
unit-tests:
runs-on: ubuntu-latest
# Using a matrix lets us define additional versions of Python to test against
strategy:
matrix:
python-version: [ "3.10" ]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Conda environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: main/src/tests/environment.yaml
environment-name: como_tests
extra-specs: |
python=${{ matrix.python-version }}
- name: Lint with flake8
run: |
# Initialize micromamba and activate como_tests environment
eval "$(micromamba shell hook --shell=bash)" && micromamba activate como_tests
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --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 --statistics
- name: Run tests
run: |
# Initialize micromamba and activate como_tests environment
eval "$(micromamba shell hook --shell=bash)" && micromamba activate como_tests
python -m pytest