From 5e251d14e2052001b757ff273d1c2cbd12ded96e Mon Sep 17 00:00:00 2001 From: Ted Chambers Date: Sat, 23 Nov 2019 10:16:00 -0500 Subject: [PATCH 1/5] Create pythonpackage.yml --- .github/workflows/pythonpackage.yml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/pythonpackage.yml diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml new file mode 100644 index 00000000..bc2f6416 --- /dev/null +++ b/.github/workflows/pythonpackage.yml @@ -0,0 +1,34 @@ +name: Python package + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [2.7, 3.5, 3.6, 3.7] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Lint with flake8 + run: | + pip install flake8 + # 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: | + pip install pytest + pytest From b3acbac813a2fda335918a0df822c79f395048df Mon Sep 17 00:00:00 2001 From: Ted Chambers Date: Sat, 23 Nov 2019 11:24:06 -0500 Subject: [PATCH 2/5] Update pythonpackage.yml --- .github/workflows/pythonpackage.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index bc2f6416..71eedd07 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -17,17 +17,11 @@ jobs: uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - name: Lint with flake8 run: | pip install flake8 # 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: | pip install pytest From 6ddc1fce330f11fe9d89f3db3643a2530a296124 Mon Sep 17 00:00:00 2001 From: Ted Chambers Date: Sat, 23 Nov 2019 11:27:37 -0500 Subject: [PATCH 3/5] add msrest prereq --- .github/workflows/pythonpackage.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 71eedd07..7fa61909 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -17,6 +17,10 @@ jobs: uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install msrest - name: Lint with flake8 run: | pip install flake8 From a840e5ae009cca3a3668866ad5e960cedeae0b4e Mon Sep 17 00:00:00 2001 From: Ted Chambers Date: Sat, 23 Nov 2019 11:56:21 -0500 Subject: [PATCH 4/5] temp remove tests and python compile --- .github/workflows/pythonpackage.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 7fa61909..3cc71501 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -21,12 +21,11 @@ jobs: run: | python -m pip install --upgrade pip pip install msrest + - name: Python compile + run: | + python -m compileall . - name: Lint with flake8 run: | pip install flake8 # 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: | - pip install pytest - pytest From f3250509774ea38b2c520b61c73752436ea98ea8 Mon Sep 17 00:00:00 2001 From: Ted Chambers Date: Sat, 23 Nov 2019 12:57:01 -0500 Subject: [PATCH 5/5] add back test --- .github/workflows/pythonpackage.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 3cc71501..b344449e 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -29,3 +29,7 @@ jobs: pip install flake8 # 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: | + pip install pytest + pytest