fixed pytest action #27
Workflow file for this run
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: mopper-all-tests | |
#on: [push] | |
on: | |
push: | |
branches: | |
#- prerelease | |
- class | |
#pull_request: | |
# branches: | |
# - main | |
# - prerelease | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
strategy: | |
max-parallel: 5 | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Python 3.10 | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Miniconda | |
uses: conda-incubator/[email protected] | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
#- name: Add conda to system path | |
# run: | | |
# # $CONDA is an environment variable pointing to the root of the miniconda directory | |
# echo $CONDA/bin >> $GITHUB_PATH | |
- name: Install dependencies | |
run: | | |
#conda config --set solver classic | |
# this seems to slow it down!!! | |
conda env update --file conda/test-env.yaml --name base | |
- name: Lint with ruff | |
run: | | |
conda install -c conda-forge ruff #--solver classic | |
ruff check --output-format=github . | |
continue-on-error: true | |
# making sure we are testing installed package | |
- name: Install package | |
run: | | |
pip install -e . | |
- name: Test with pytest | |
run: | | |
conda install pytest coverage codecov #--solver classic | |
conda install -c conda-forge pyfakefs | |
conda run python -m pytest | |
#conda run coverage run --source src -m py.test | |
# - name: Upload to codecov | |
# if: steps.build.outcome == 'success' | |
# run: | | |
# curl -Os https://uploader.codecov.io/latest/linux/codecov | |
# chmod +x codecov | |
# ./codecov | |