From 01fc861b6eb02e9c4e1d70da01ea3c346ad0e8e2 Mon Sep 17 00:00:00 2001 From: Rossen <2720787+rossengeorgiev@users.noreply.github.com> Date: Wed, 16 Dec 2020 18:13:29 +0000 Subject: [PATCH 1/9] Add workflow for testing with Github Actions --- .github/workflows/testing_initiative.yml | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/testing_initiative.yml diff --git a/.github/workflows/testing_initiative.yml b/.github/workflows/testing_initiative.yml new file mode 100644 index 00000000..7ab20452 --- /dev/null +++ b/.github/workflows/testing_initiative.yml @@ -0,0 +1,41 @@ +# 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: Testing Initiative + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: [2.7, 3.5, 3.6, 3.7, 3.8] +# exclude: +# - os: macos-latest +# python-version: 3.8 +# - os: windows-latest +# python-version: 3.6 + steps: + - uses: actions/checkout@v2 + - name: Set up Python Env + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: Install dependencies + run: | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install coveralls + - name: Run Tests + run: | + PYTHONHASHSEED=0 pytest --cov=steam tests + - name: Submit coveralls + run: | + coveralls From 11a6a7cfa052a9ce97651b1491c6af02d1afcb0d Mon Sep 17 00:00:00 2001 From: Rossen <2720787+rossengeorgiev@users.noreply.github.com> Date: Wed, 16 Dec 2020 18:29:00 +0000 Subject: [PATCH 2/9] Remove travis config --- .travis.yml | 65 ----------------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c89dfed3..00000000 --- a/.travis.yml +++ /dev/null @@ -1,65 +0,0 @@ -language: python -os: linux -jobs: - include: -# docs build - - name: Docs (py36) - python: 3.6 - install: make init - script: make docs - after_script: [] -# linux - - python: 2.7 - - python: 3.5 - - python: 3.6 - - python: 3.7 - - python: 3.8 -# OSX - - name: OSX Python 2.7 - os: osx - language: shell - before_install: - - cp -fv `which python2` `which python` || true - - cp -fv `which pip2` `which pip` || true - - pip install --upgrade pip - after_script: [] - - name: OSX Python 3.7 - os: osx - language: shell - before_install: - - cp -fv `which python3` `which python` || true - - cp -fv `which pip3` `which pip` || true - - pip install --upgrade pip - after_script: [] -# Windows - - name: Win Python 3.6 - language: shell - os: windows - env: PATH=/c/Python36:/c/Python36/Scripts:$PATH - before_install: - - choco install python --version 3.6.8 - - python -m pip install --upgrade pip - after_script: [] - - name: Win Python 3.7 - language: shell - os: windows - env: PATH=/c/Python37:/c/Python37/Scripts:$PATH - before_install: - - choco install python --version 3.7.4 - - python -m pip install --upgrade pip - after_script: [] - - name: Win Python 3.8 - language: shell - os: windows - env: PATH=/c/Python38:/c/Python38/Scripts:$PATH - before_install: - - choco install python --version 3.8.2 - - python -m pip install --upgrade pip - after_script: [] -install: - - pip install -r requirements.txt - - pip install coveralls -script: - - PYTHONHASHSEED=0 pytest --cov=steam tests -after_script: - - coveralls From 43cb2448c45ea3367cfd5d6fd233fb3db883b12e Mon Sep 17 00:00:00 2001 From: Rossen <2720787+rossengeorgiev@users.noreply.github.com> Date: Wed, 16 Dec 2020 18:29:56 +0000 Subject: [PATCH 3/9] add token for coveralls --- .github/workflows/testing_initiative.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/testing_initiative.yml b/.github/workflows/testing_initiative.yml index 7ab20452..890cabce 100644 --- a/.github/workflows/testing_initiative.yml +++ b/.github/workflows/testing_initiative.yml @@ -37,5 +37,7 @@ jobs: run: | PYTHONHASHSEED=0 pytest --cov=steam tests - name: Submit coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} run: | coveralls From 37c996b44acdd8083175a51d88115ffad5ce7e16 Mon Sep 17 00:00:00 2001 From: Rossen <2720787+rossengeorgiev@users.noreply.github.com> Date: Wed, 16 Dec 2020 18:40:51 +0000 Subject: [PATCH 4/9] Add coverals actions + build docs steps --- .github/workflows/testing_initiative.yml | 37 ++++++++++++++++++++---- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/.github/workflows/testing_initiative.yml b/.github/workflows/testing_initiative.yml index 890cabce..d3867a82 100644 --- a/.github/workflows/testing_initiative.yml +++ b/.github/workflows/testing_initiative.yml @@ -10,7 +10,7 @@ on: branches: [ master ] jobs: - build: + test: runs-on: ${{ matrix.os }} strategy: matrix: @@ -36,8 +36,33 @@ jobs: - name: Run Tests run: | PYTHONHASHSEED=0 pytest --cov=steam tests - - name: Submit coveralls - env: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - run: | - coveralls + - name: Coveralls Parallel + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + flag-name: run-${{ matrix.test_number }} + parallel: true + finish: + needs: test + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true + build-docs: + run-on: ubuntu-latest + python-version: 3.6 + steps: + - uses: actions/checkout@v2 + - name: Set up Python Env + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: Install dependencies + run: make init + - name: Build Docs + run: make docs From 4331ffbc618b4e352dbd23bddc294450155eb3ea Mon Sep 17 00:00:00 2001 From: Rossen <2720787+rossengeorgiev@users.noreply.github.com> Date: Wed, 16 Dec 2020 18:42:38 +0000 Subject: [PATCH 5/9] fix build docs step --- .github/workflows/testing_initiative.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing_initiative.yml b/.github/workflows/testing_initiative.yml index d3867a82..29c79646 100644 --- a/.github/workflows/testing_initiative.yml +++ b/.github/workflows/testing_initiative.yml @@ -52,8 +52,11 @@ jobs: github-token: ${{ secrets.github_token }} parallel-finished: true build-docs: - run-on: ubuntu-latest - python-version: 3.6 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + python-version: [3.6] steps: - uses: actions/checkout@v2 - name: Set up Python Env From 7b33b8b3832a0c538776aa229895075487420794 Mon Sep 17 00:00:00 2001 From: Rossen <2720787+rossengeorgiev@users.noreply.github.com> Date: Wed, 16 Dec 2020 19:51:46 +0000 Subject: [PATCH 6/9] simple coveralls and fix powershell syntax --- .github/workflows/testing_initiative.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/testing_initiative.yml b/.github/workflows/testing_initiative.yml index 29c79646..ed070d10 100644 --- a/.github/workflows/testing_initiative.yml +++ b/.github/workflows/testing_initiative.yml @@ -31,26 +31,16 @@ jobs: run: python -c "import sys; print(sys.version)" - name: Install dependencies run: | - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install -r requirements.txt pip install coveralls - name: Run Tests run: | PYTHONHASHSEED=0 pytest --cov=steam tests - - name: Coveralls Parallel - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} - flag-name: run-${{ matrix.test_number }} - parallel: true - finish: - needs: test - runs-on: ubuntu-latest - steps: - - name: Coveralls Finished - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} - parallel-finished: true + - name: Coveralls + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + coveralls build-docs: runs-on: ${{ matrix.os }} strategy: From 518edeb4eb7fc7c83253d4174f8cc02e7394444a Mon Sep 17 00:00:00 2001 From: Rossen <2720787+rossengeorgiev@users.noreply.github.com> Date: Wed, 16 Dec 2020 19:54:03 +0000 Subject: [PATCH 7/9] add COVERALLS_REPO_TOKEN --- .github/workflows/testing_initiative.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testing_initiative.yml b/.github/workflows/testing_initiative.yml index ed070d10..4dbae207 100644 --- a/.github/workflows/testing_initiative.yml +++ b/.github/workflows/testing_initiative.yml @@ -39,6 +39,7 @@ jobs: - name: Coveralls env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} run: | coveralls build-docs: From 2d7be7104f97670c959d5fce6bf8c2fb27be5e5e Mon Sep 17 00:00:00 2001 From: Rossen <2720787+rossengeorgiev@users.noreply.github.com> Date: Wed, 16 Dec 2020 19:57:40 +0000 Subject: [PATCH 8/9] set PYTHONHASHSEED properly --- .github/workflows/testing_initiative.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing_initiative.yml b/.github/workflows/testing_initiative.yml index 4dbae207..7a867840 100644 --- a/.github/workflows/testing_initiative.yml +++ b/.github/workflows/testing_initiative.yml @@ -34,8 +34,10 @@ jobs: pip install -r requirements.txt pip install coveralls - name: Run Tests + env: + PYTHONHASHSEED: "0" run: | - PYTHONHASHSEED=0 pytest --cov=steam tests + pytest --cov=steam tests - name: Coveralls env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 2229330afc2b1f15cf1945b197776e2b278dedce Mon Sep 17 00:00:00 2001 From: Rossen <2720787+rossengeorgiev@users.noreply.github.com> Date: Wed, 16 Dec 2020 20:11:47 +0000 Subject: [PATCH 9/9] workflow: add ignore paths --- .github/workflows/testing_initiative.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing_initiative.yml b/.github/workflows/testing_initiative.yml index 7a867840..f660d645 100644 --- a/.github/workflows/testing_initiative.yml +++ b/.github/workflows/testing_initiative.yml @@ -6,9 +6,26 @@ name: Testing Initiative on: push: branches: [ master ] + paths-ignore: + - '.gitignore' + - '*.md' + - '*.rst' + - 'LICENSE' + - 'Vagrantfile' + - 'protobuf_list.txt' + - 'protobufs/**' + - 'recipes/**' pull_request: branches: [ master ] - + paths-ignore: + - '.gitignore' + - '*.md' + - '*.rst' + - 'LICENSE' + - 'Vagrantfile' + - 'protobuf_list.txt' + - 'protobufs/**' + - 'recipes/**' jobs: test: runs-on: ${{ matrix.os }}