name: PDBFixer Continuous Integration Workflow

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  build_test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.7, 3.8, 3.9]

    steps:
      - uses: actions/checkout@v2
        name: "Checkout the source code"

      - uses: conda-incubator/setup-miniconda@v2
        name: "Prepare base dependencies"
        with:
          python-version: ${{ matrix.python-version }}
          activate-environment: pdbfixer-dev
          environment-file: devtools/environment-dev.yaml

      - name: "Install PDBFixer"
        shell: bash -l {0}
        run: |
          which python
          python -V
          pip install -e .
          pytest -vs pdbfixer
