From 44d0ef5cc3f420205e3d893abb362a507dd93af2 Mon Sep 17 00:00:00 2001 From: Rossen <2720787+rossengeorgiev@users.noreply.github.com> Date: Wed, 16 Dec 2020 20:17:25 +0000 Subject: [PATCH] Migrate from travis-ci to Github Actions (#300) --- .github/workflows/testing_initiative.yml | 81 ++++++++++++++++++++++++ .travis.yml | 65 ------------------- 2 files changed, 81 insertions(+), 65 deletions(-) create mode 100644 .github/workflows/testing_initiative.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/testing_initiative.yml b/.github/workflows/testing_initiative.yml new file mode 100644 index 0000000..f660d64 --- /dev/null +++ b/.github/workflows/testing_initiative.yml @@ -0,0 +1,81 @@ +# 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 ] + 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 }} + 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: | + pip install -r requirements.txt + pip install coveralls + - name: Run Tests + env: + PYTHONHASHSEED: "0" + run: | + pytest --cov=steam tests + - name: Coveralls + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + run: | + coveralls + build-docs: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c89dfed..0000000 --- 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