Update build actions. #99
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: Build and Test (Branch) | |
on: | |
push: | |
branches: [ '**' ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.10'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge,defaults | |
channel-priority: strict | |
show-channel-urls: true | |
miniforge-version: latest | |
miniforge-variant: Mambaforge | |
- name: Configure conda and install code | |
shell: bash -l {0} | |
run: | | |
mamba install -y --file requirements.txt --file requirements-dev.txt | |
python -m pip install --no-deps . | |
- name: Lint with flake8 | |
shell: bash -l {0} | |
run: | | |
# stop the build if it fails flake8 with default pyproject.toml | |
flake8 . --count --show-source --statistics | |
- name: Test with pytest | |
shell: bash -l {0} | |
run: | | |
pytest |