Merge pull request #693 from abhishekkumar177/main #4
This file contains hidden or 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: Python Package using Conda | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| max-parallel: 5 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Miniconda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| python-version: 3.10 | |
| activate-environment: base | |
| environment-file: environment.yml | |
| use-mamba: true # faster dependency resolution | |
| - name: Verify conda environment | |
| run: conda info | |
| - name: Lint with flake8 | |
| run: | | |
| conda install flake8 --yes | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| - name: Test with pytest | |
| run: | | |
| conda install pytest --yes | |
| pytest --maxfail=1 --disable-warnings -q |