Repository: dayyass/calculus-of-variations (language: python)

Issue:
add ci



Discussion / hints:

Fix patch:
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 0000000..a24c6d2
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,38 @@
+# This workflow will install Python dependencies, run tests and lint with a single version of Python
+# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
+
+name: lint
+
+on:
+  push:
+    branches: [ main ]
+  pull_request:
+    branches: [ main ]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - name: Set up Python 3.8
+      uses: actions/setup-python@v2
+      with:
+        python-version: 3.8
+    - name: Install dependencies
+      run: |
+        python -m pip install --upgrade pip
+        pip install isort black flake8 types-PyYAML mypy
+    - name: Code format check with isort
+      run: |
+        isort --check-only --profile black .
+    - name: Code format check with black
+      run: |
+        black --check .
+    - 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: Type check with mypy
+      run: mypy --ignore-missing-imports .
\ No newline at end of file
diff --git a/README.md b/README.md
index f13cdb3..0253c11 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
-<!-- ![test Status](https://github.com/dayyass/pytorch_ner/workflows/test/badge.svg) -->
-<!-- ![lint Status](https://github.com/dayyass/pytorch_ner/workflows/lint/badge.svg) -->
-![License](https://img.shields.io/github/license/dayyass/calculus_of_variations)
-![release (latest by date)](https://img.shields.io/github/v/release/dayyass/calculus_of_variations)
+[![tests status](https://github.com/dayyass/calculus_of_variations/workflows/tests/badge.svg)](.github/workflows/tests.yml)
+[![lint status](https://github.com/dayyass/calculus_of_variations/workflows/lint/badge.svg)](.github/workflows/lint.yml)
+[![license](https://img.shields.io/github/license/dayyass/calculus_of_variations)](LICENSE)
+[![release (latest by date)](https://img.shields.io/github/v/release/dayyass/calculus_of_variations)](https://github.com/dayyass/calculus_of_variations/releases/latest)
 [![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
 
 ### About
@@ -61,10 +61,10 @@ More about each task in [project wiki](https://github.com/dayyass/calculus_of_va
 ### Usage
 First, install dependencies:
 ```
-# clone repo   
+# clone repo
 git clone https://github.com/dayyass/calculus_of_variations.git
 
-# install dependencies   
+# install dependencies
 cd calculus_of_variations
 pip install -r requirements.txt
 ```
diff --git a/requirements.txt b/requirements.txt
index 1c6be2f..52bf12b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,5 @@
 appdirs==1.4.4
+attrs==21.2.0
 Brotli==1.0.9
 cfgv==3.2.0
 click==7.1.2
@@ -13,14 +14,20 @@ Flask==1.1.2
 Flask-Compress==1.8.0
 future==0.18.2
 identify==1.5.10
+iniconfig==1.1.1
 itsdangerous==1.1.0
 Jinja2==2.11.3
 MarkupSafe==1.1.1
 mpmath==1.1.0
 nodeenv==1.5.0
+packaging==20.9
 parameterized==0.7.4
 plotly==4.12.0
+pluggy==0.13.1
 pre-commit==2.9.3
+py==1.10.0
+pyparsing==2.4.7
+pytest==6.2.4
 PyYAML==5.4
 retrying==1.3.3
 six==1.15.0


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..48d8099
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,31 @@
+# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
+# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
+
+name: test
+
+on:
+  push:
+    branches: [ main ]
+  pull_request:
+    branches: [ main ]
+
+jobs:
+  build:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        python-version: ['3.6', '3.7', '3.8', '3.9']
+        os: [ubuntu-latest, macOS-latest, windows-latest]
+    steps:
+    - uses: actions/checkout@v2
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v2
+      with:
+        python-version: ${{ matrix.python-version }}
+    - name: Install dependencies
+      run: |
+        python -m pip install --upgrade pip
+        pip install -r requirements.txt
+    - name: Test with pytest
+      run: |
+        pytest
\ No newline at end of file