diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 79775ca..9983bf2 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -7,22 +7,38 @@ concurrency: cancel-in-progress: true jobs: - # Use pytest to run tests - pytest: + run_pytest: runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.10.2] + steps: - - name: Checkout repo - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 + # Checkout code and install miniconda + environment + - uses: actions/checkout@v4 + - uses: mamba-org/setup-micromamba@v1 with: - python-version: "3.10" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pytest - - name: Install repo + init-shell: bash + create-args: >- + python=${{ matrix.python-version }} + pip + environment-file: environment.yml + environment-name: anglerfish-dev + + # Install Anglerfish + - shell: bash -l {0} + name: Install Anglerfish run: | python -m pip install . - - name: pytest --> Run tests - run: pytest . + + # Install Pytest + - shell: bash -l {0} + name: Install Pytest + run: | + python -m pip install pytest + + # Run Pytest + - shell: bash -l {0} + name: Run Pytest + run: | + pytest .