Ensure pytest is installed and environment is activated #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Pipeline | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
branches: | |
- main | |
- master | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v3 | |
- name: Set up Conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: 3.11 | |
environment-file: environment.yml | |
activate-environment: drone_env # Ensure this matches the environment name | |
auto-activate-base: false | |
- name: Run Tests | |
run: | | |
source activate drone_env # Activate the conda environment | |
pytest tests/ | |
- name: Run Flake8 | |
run: | | |
source activate drone_env # Activate the conda environment | |
flake8 . |