From 392847ed7dcdc1670683450526d2070054c42fa8 Mon Sep 17 00:00:00 2001 From: theomeuh Date: Wed, 11 Mar 2020 17:09:29 +0100 Subject: [PATCH 1/3] Create pythonapp.yml --- .github/workflows/pythonapp.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/pythonapp.yml diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml new file mode 100644 index 0000000..1419ec2 --- /dev/null +++ b/.github/workflows/pythonapp.yml @@ -0,0 +1,32 @@ +# 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: Python application + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.6 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pipenv + pipenv lock --requirements > requirements.txt + pip install -r requirements.txt + - name: Test with pytest + run: | + pip install pytest + pytest back/**/*.py From 7cdf6715ffe01c7d35618f2f9c06357e0842e0b7 Mon Sep 17 00:00:00 2001 From: theomeuh Date: Wed, 11 Mar 2020 17:12:47 +0100 Subject: [PATCH 2/3] Use py3.6 everywhere in pythonapp.yaml --- .github/workflows/pythonapp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 1419ec2..119256e 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.6 uses: actions/setup-python@v1 with: python-version: 3.6 From b1925574a670775efafc5c70938b18e4a8294281 Mon Sep 17 00:00:00 2001 From: theomeuh Date: Wed, 11 Mar 2020 17:15:59 +0100 Subject: [PATCH 3/3] Run commands in back folder --- .github/workflows/pythonapp.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 119256e..7496626 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -22,11 +22,13 @@ jobs: python-version: 3.6 - name: Install dependencies run: | + cd back/ python -m pip install --upgrade pip pip install pipenv pipenv lock --requirements > requirements.txt pip install -r requirements.txt - name: Test with pytest run: | + cd back pip install pytest - pytest back/**/*.py + pytest ./**/*.py