From 5cb0e3131dfa4860648eb55959c30803a72da6b3 Mon Sep 17 00:00:00 2001 From: Jb DOYON Date: Wed, 21 Apr 2021 19:38:59 +0100 Subject: [PATCH 1/5] Add basic github action for CI Tries to poetry install, then show the installed package via pip. Not yet tackling tox, which requires figuring out environment matrix of github. Only pushes to master & PRs trigger job (not branches) --- .github/workflows/CI.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..26f105e --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,32 @@ +on: + push: + branches: [master] + pull_request: + + +name: Continuous integration + +jobs: + ci: + strategy: + fail-fast: false + matrix: + python-version: [3.6] + os: [ubuntu-18.04, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - uses: abatilo/actions-poetry@v2.0.0 + with: + poetry-version: 1.1.6 + - name: Install package locally + run: poetry install + - name: Check locally-built package is ready + run: pip show keras-surgeon + # Disabled while we check the basics of package install + # - name: Run tox + # run: tox + From e5bf0c38dc9af6c223e58992524fc84d0688974a Mon Sep 17 00:00:00 2001 From: Jb DOYON Date: Wed, 21 Apr 2021 19:50:37 +0100 Subject: [PATCH 2/5] Add manual run button for CI --- .github/workflows/CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 26f105e..abc76f5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -2,7 +2,8 @@ on: push: branches: [master] pull_request: - + # Allow manual runs of the Github Action + workflow_dispatch: name: Continuous integration From 52e06e13f23a7ab92b73caaf996085dde4bbdbda Mon Sep 17 00:00:00 2001 From: Jb DOYON Date: Thu, 22 Apr 2021 21:44:01 +0100 Subject: [PATCH 3/5] Add tox to CI --- .github/workflows/CI.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index abc76f5..86e86da 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,6 +14,7 @@ jobs: matrix: python-version: [3.6] os: [ubuntu-18.04, macos-latest, windows-latest] + tf2_version: [0,1,2,3] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -23,11 +24,9 @@ jobs: - uses: abatilo/actions-poetry@v2.0.0 with: poetry-version: 1.1.6 - - name: Install package locally + + - name: Install deps and package run: poetry install - - name: Check locally-built package is ready - run: pip show keras-surgeon - # Disabled while we check the basics of package install - # - name: Run tox - # run: tox + - name: Run tox + run: tox -e py36-tf2_${{ matrix.tf2_version }} From 7d149ba85aedc141645c0c591257f69d8553ac71 Mon Sep 17 00:00:00 2001 From: Jb DOYON Date: Thu, 22 Apr 2021 21:49:19 +0100 Subject: [PATCH 4/5] Run tox in poetry --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 86e86da..14a98e7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -29,4 +29,4 @@ jobs: run: poetry install - name: Run tox - run: tox -e py36-tf2_${{ matrix.tf2_version }} + run: poetry run tox -e py36-tf2_${{ matrix.tf2_version }} From 1ab335d3a5a819d6cfeff01a0070bc3978595129 Mon Sep 17 00:00:00 2001 From: Jb DOYON Date: Thu, 22 Apr 2021 21:59:30 +0100 Subject: [PATCH 5/5] Refactor tox tf2_version in CI --- .github/workflows/CI.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 14a98e7..78f2dfd 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -12,9 +12,9 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.6] os: [ubuntu-18.04, macos-latest, windows-latest] - tf2_version: [0,1,2,3] + python-version: [3.6] + tf2_version: [tf2_0, tf2_1, tf2_2, tf2_3] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -29,4 +29,4 @@ jobs: run: poetry install - name: Run tox - run: poetry run tox -e py36-tf2_${{ matrix.tf2_version }} + run: poetry run tox -e py36-${{ matrix.tf2_version }}