DeepRegNet/DeepReg

View on GitHub
.github/workflows/python-integration-test.yml

Summary

Maintainability
Test Coverage
name: Integration Test

on:
  workflow_dispatch:
  # Trigger the workflow on push or pull request,
  # but only for the main branch
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  integration-test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
        python-version: ["3.7"]

    steps:
      - uses: actions/checkout@v2
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install Ubuntu system dependencies
        if: ${{ matrix.os == 'ubuntu-latest' }}
        run: |
          sudo apt-get update
          sudo apt-get install graphviz
      - name: Install Mac OS system dependencies
        if: ${{ matrix.os == 'macos-latest' }}
        run: |
          brew install graphviz
      - name: Install python dependencies
        run: |
          python -m pip install --upgrade pip
          pip install codecov==2.1.11
          pip install -e .
      - name: Test examples
        run: |
          pytest test/integration/test_examples.py
      - name: Test demos
        run: |
          pytest test/integration/test_demos.py