Skip to content

Commit

Permalink
Run pytest using local conda installation (#265)
Browse files Browse the repository at this point in the history
This verifies the test suite can run using the dependencies defined in
meta.yaml.
  • Loading branch information
SeanBryan51 authored Mar 19, 2024
1 parent 51758c8 commit a124abd
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,25 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
# Fetch all history for all tags and branches (tag information is
# required when building the conda package)
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: '3.9'
auto-activate-base: false
activate-environment: benchcab-dev
environment-file: .conda/benchcab-dev.yaml
- name: Build and install conda package
run: |
conda install conda-build
conda build -c conda-forge -c accessnri -c coecms .
conda install --no-channel-priority -c $CONDA_PREFIX/conda-bld -c conda-forge -c accessnri -c coecms benchcab
conda uninstall conda-build
- name: Test with pytest
run: |
conda install pytest-cov
pytest --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml

build_conda_package:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: '3.9'
- name: Test conda build
run: |
conda install conda-build
conda build -c conda-forge -c accessnri -c coecms .

0 comments on commit a124abd

Please sign in to comment.