Skip to content

Remove mock dependency #59

Remove mock dependency

Remove mock dependency #59

Workflow file for this run

env:
PYTHONUNBUFFERED: "TRUE"
name: test
on: [pull_request, workflow_call]
jobs:
lint:
uses: ISISComputingGroup/reusable-workflows/.github/workflows/linters.yml@main
with:
compare-branch: origin/main
python-ver: '3.11'
unit-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
version: ['3.11']
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.version }}
- name: Install base requirements
run: pip install -e .
- name: Verify package is importable
run: |
python -c "from genie_python.genie_startup import *"
python -c "from genie_python import genie as g"
- name: Install dev requirements
run: pip install -e .[dev]
- name: Run unit tests
run: python -m pytest
results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [lint, unit-tests]
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}