From 6955e7fc591813d1d631e14be7ef6b18ac45fd1b Mon Sep 17 00:00:00 2001 From: Abhishek V Raman Date: Wed, 5 Oct 2022 15:34:34 +0530 Subject: [PATCH] testing on different os with badges --- .github/workflows/build-macos.yml | 6 ++-- .github/workflows/build-ubuntu.yml | 48 +++++++++++++++++++++++++++++ .github/workflows/build-windows.yml | 48 +++++++++++++++++++++++++++++ README.md | 4 ++- 4 files changed, 101 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/build-ubuntu.yml create mode 100644 .github/workflows/build-windows.yml diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 4e4bd7e..0a22e3f 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -1,4 +1,4 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# This workflow will install Python dependencies on MacOS and run tests. # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: Propylean on MacOS @@ -6,8 +6,6 @@ name: Propylean on MacOS on: push: branches: [ main ] - pull_request: - branches: [ main ] jobs: build: @@ -16,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8"] + python-version: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml new file mode 100644 index 0000000..7d16e00 --- /dev/null +++ b/.github/workflows/build-ubuntu.yml @@ -0,0 +1,48 @@ +# This workflow will install Python dependencies on Ubuntu and run tests. +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Propylean on Ubuntu + +on: + push: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + python -m pip install thermo + python -m pip install fluids + python -m pip install pandas + python -m pip install build + - name: Install Propylean + run: | + git clone https://github.com/abhishekvraman/Propylean.git + cd Propylean + git checkout dev + python -m build + python -m pip install dist/propylean*.whl + - 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 + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest tests diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 0000000..b7cd5a6 --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,48 @@ +# This workflow will install Python dependencies on Windows and run tests. +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Propylean on Windows + +on: + push: + branches: [ main ] + +jobs: + build: + + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + python -m pip install thermo + python -m pip install fluids + python -m pip install pandas + python -m pip install build + - name: Install Propylean + run: | + git clone https://github.com/abhishekvraman/Propylean.git + cd Propylean + git checkout dev + python -m build + python -m pip install dist/propylean*.whl + - 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 + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest tests diff --git a/README.md b/README.md index 3bd8b00..1daf33f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -[![Build](https://github.com/abhishekvraman/Propylean/actions/workflows/python-package.yml/badge.svg?branch=main)](https://github.com/abhishekvraman/Propylean/actions/workflows/python-package.yml) +[![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white)](https://github.com/abhishekvraman/Propylean/actions/workflows/build-windows.yml) +[![macOS](https://img.shields.io/badge/mac%20os-000000?style=for-the-badge&logo=macos&logoColor=F0F0F0)](https://github.com/abhishekvraman/Propylean/actions/workflows/build-macos.yml) +[![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?style=for-the-badge&logo=ubuntu&logoColor=white)](https://github.com/abhishekvraman/Propylean/actions/workflows/build-ubuntu.yml) [![License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/abhishekvraman/Propylean/blob/main/LICENSE) [![PythonVersions](https://img.shields.io/pypi/pyversions/propylean.svg?style=flat)](https://pypi.python.org/pypi/propylean) # Propylean