From c77f50773998c7faa2f0b390cae81491a2da43dd Mon Sep 17 00:00:00 2001 From: Terri Oda Date: Wed, 20 Nov 2019 10:56:34 -0800 Subject: [PATCH 1/9] split off black check --- .github/workflows/pythonapp.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 5d6f7da451..a0ed147c66 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -28,3 +28,22 @@ jobs: - name: Run tests run: | ACTIONS=1 python setup.py test + + check: + name: Black check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Lint with black + run: | + pip install black + black --check cve_bin_tool/ + black --check test/ From cbd9d2f5adddd78bc4ab75a8c0c9473fae991ee3 Mon Sep 17 00:00:00 2001 From: Terri Oda Date: Wed, 20 Nov 2019 11:01:13 -0800 Subject: [PATCH 2/9] try out precanned action --- .github/workflows/pythonapp.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index a0ed147c66..9c222c1198 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -38,12 +38,6 @@ jobs: uses: actions/setup-python@v1 with: python-version: ${{ matrix.python }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - name: Lint with black - run: | - pip install black - black --check cve_bin_tool/ - black --check test/ + uses: jpetrucciani/black-check@master + From 2b87dbf1acf8591429485db213ed2eb8d9ce0416 Mon Sep 17 00:00:00 2001 From: Terri Oda Date: Wed, 20 Nov 2019 11:04:12 -0800 Subject: [PATCH 3/9] run black without action --- .github/workflows/pythonapp.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 9c222c1198..6338d3f91c 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -39,5 +39,8 @@ jobs: with: python-version: ${{ matrix.python }} - name: Lint with black - uses: jpetrucciani/black-check@master + run: | + pip install black + black --check cve_bin_tool/ + black --check tests/ From bf15860c59e7de3f8c3dcec9ab2b75837e3347b5 Mon Sep 17 00:00:00 2001 From: Terri Oda Date: Wed, 20 Nov 2019 11:05:49 -0800 Subject: [PATCH 4/9] simplify --- .github/workflows/pythonapp.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 6338d3f91c..355cb26e09 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -33,14 +33,5 @@ jobs: name: Black check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python }} - - name: Lint with black - run: | - pip install black - black --check cve_bin_tool/ - black --check tests/ + - uses: jpetrucciani/black-check@master From 636e043177657cbcc61a59383cfbaaccac988277 Mon Sep 17 00:00:00 2001 From: Terri Oda Date: Wed, 20 Nov 2019 11:07:07 -0800 Subject: [PATCH 5/9] don't over-simplify --- .github/workflows/pythonapp.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 355cb26e09..59b54f86e2 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -33,5 +33,6 @@ jobs: name: Black check runs-on: ubuntu-latest steps: + - uses: actions/checkout@v1 - uses: jpetrucciani/black-check@master From f0abdc7cfb250e9de4b7bd0c1f86572a374ccd1e Mon Sep 17 00:00:00 2001 From: Terri Oda Date: Wed, 20 Nov 2019 11:08:45 -0800 Subject: [PATCH 6/9] reorder so check shows up first in list --- .github/workflows/pythonapp.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 59b54f86e2..0556387b70 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -3,6 +3,13 @@ name: cve-bin-tool on: [push, pull_request] jobs: + check: + name: Black check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: jpetrucciani/black-check@master + build: runs-on: ${{ matrix.os }} @@ -29,10 +36,3 @@ jobs: run: | ACTIONS=1 python setup.py test - check: - name: Black check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: jpetrucciani/black-check@master - From d4add479d65c5c52b2bb7df629956fea0a855394 Mon Sep 17 00:00:00 2001 From: Terri Oda Date: Wed, 20 Nov 2019 11:10:28 -0800 Subject: [PATCH 7/9] remove black from main build, add windows --- .github/workflows/pythonapp.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 0556387b70..f57be8b7eb 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -15,7 +15,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, windows-latest] python: [3.6, 3.7] steps: - uses: actions/checkout@v1 @@ -27,11 +27,6 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - - name: Lint with black - run: | - pip install black - black --check cve_bin_tool/ - black --check test/ - name: Run tests run: | ACTIONS=1 python setup.py test From 814a14fc079ac22d4eae98d7af08e98dd65be2f6 Mon Sep 17 00:00:00 2001 From: Terri Oda Date: Wed, 20 Nov 2019 11:13:59 -0800 Subject: [PATCH 8/9] Move actions to env (for windows compatibility) --- .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 f57be8b7eb..f31bc913b9 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -17,6 +17,8 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] python: [3.6, 3.7] + env: + ACTIONS: 1 steps: - uses: actions/checkout@v1 - name: Set up Python @@ -29,5 +31,5 @@ jobs: pip install -r requirements.txt - name: Run tests run: | - ACTIONS=1 python setup.py test + python setup.py test From 27a6b3fa77fbd2e54a41080e6ba5c7366d47c6a2 Mon Sep 17 00:00:00 2001 From: Terri Oda Date: Wed, 20 Nov 2019 14:12:02 -0800 Subject: [PATCH 9/9] Remove windows which is not functioning --- .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 f31bc913b9..6ccab0f37b 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -15,7 +15,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] python: [3.6, 3.7] env: ACTIONS: 1