Merge pull request #186 from fchichorro/ecoinvent3.10/new_flowables #216
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
# This workflow will install Python dependencies, run tests and lint | |
# across operating systems and select versions of Python | |
# For more info see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python CI/CD tests | |
on: | |
push: | |
# branches: [master, develop] | |
paths-ignore: # prevents workflow execution when only these types of files are modified | |
- '**.md' # wildcards prevent file in any repo dir from trigering workflow | |
# - '**.ya?ml' # captures both .yml and .yaml | |
- 'LICENSE' | |
- '.gitignore' | |
pull_request: | |
branches: [master, develop] | |
types: [opened, reopened, ready_for_review] # excludes syncronize to avoid redundant trigger from commits on PRs | |
paths-ignore: | |
- '**.md' | |
- '**.ya?ml' | |
- 'LICENSE' | |
- '.gitignore' | |
workflow_dispatch: # also allow manual trigger, for testing purposes | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
py-version: ['3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v3 | |
# general Python setup | |
- name: Set up Python ${{ matrix.py-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.py-version }} | |
- name: Update pip & install testing pkgs | |
run: | | |
python -VV | |
python -m pip install --upgrade pip setuptools wheel | |
pip install pytest pytest-cov flake8 | |
# install package & dependencies | |
- name: Install package and dependencies | |
run: | | |
pip install . | |
# linting & pytest | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
- name: Test with pytest | |
run: | | |
python fedelemflowlist/flowlist.py | |
pytest --doctest-modules |