From 6337eca57f2f5dae9fabd3aa3fb969aca01e0aff Mon Sep 17 00:00:00 2001 From: LoopThrough-i-j Date: Thu, 4 Feb 2021 04:53:55 +0530 Subject: [PATCH] CI: Setup CI with Github Actions replacing Travis. --- .github/workflows/zulip-tests.yml | 61 +++++++++++++++++++++++++++++++ .travis.yml | 24 ------------ 2 files changed, 61 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/zulip-tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/zulip-tests.yml b/.github/workflows/zulip-tests.yml new file mode 100644 index 0000000..ffb70fc --- /dev/null +++ b/.github/workflows/zulip-tests.yml @@ -0,0 +1,61 @@ +name: build + +on: + push: + branches: + - master + pull_request: + +jobs: + static-analysis: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Setup Python 3.6 + uses: actions/setup-python@v2 + with: + python-version: 3.6 + + - name: Install dependencies + run: | + sudo rm -vf /etc/apt/sources.list.d/* + sudo apt-get update + sudo apt-get install virtualenv + tools/provision --force + + - name: Running Test-Suite + run: | + source zulip-api-py3-venv/bin/activate + tools/test-static-analysis + + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + + steps: + - uses: actions/checkout@v2 + + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + sudo rm -vf /etc/apt/sources.list.d/* + sudo apt-get update + sudo apt-get install virtualenv + tools/provision --force + + - name: Running Test-Suite + run: | + source zulip-api-py3-venv/bin/activate + tools/test-main + + - name: Codecov + uses: codecov/codecov-action@v1.2.1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d2c2458..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: python -sudo: required -python: - - "3.5" - - "3.6" - - "3.7" - - "3.8" -env: TEST_SUITE=test-main -matrix: - include: - - python: "3.6" - env: TEST_SUITE=test-static-analysis - addons: - postgresql: "9.3" -install: - - sudo rm -vf /etc/apt/sources.list.d/* - - sudo apt-get update - - tools/provision --force - - source zulip-api-py*-venv/bin/activate -script: - - tools/$TEST_SUITE -after_success: - - pip install codecov - - codecov