new todo for matching GLAMS #282
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 | |
on: ["push", "pull_request"] | |
jobs: | |
test_development: | |
# Testing in development environment: functionality and code-format | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- uses: mamba-org/setup-micromamba@v1 | |
env: | |
ACTIONS_STEP_DEBUG: true | |
with: | |
micromamba-version: '1.3.1-0' | |
environment-file: environment.yml | |
init-shell: >- | |
bash | |
powershell | |
cache-environment: true | |
cache-downloads: true | |
post-cleanup: 'all' | |
- name: List environment | |
run: | | |
micromamba info | |
micromamba list | |
- name: Run tests | |
run: | | |
isort --project pymrio --profile black --check-only . | |
coverage run --source=pymrio -m pytest --black -vv | |
- name: Coveralls upload | |
uses: coverallsapp/github-action@v2 | |
test_production: | |
# Testing if the package runs on different systems/python versions | |
needs: test_development | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
# removed -l as this breaks in mac-os | |
shell: bash {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
python-version: [3.8, 3.9, "3.10", "3.11"] | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{matrix.python-version}} | |
- name: Run tests | |
run: | | |
pip install . -U | |
pip install pytest | |
python setup.py sdist | |
pytest -vv | |