From 089b365afbc7377cfc232dc73970a92bf7f50f74 Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Tue, 14 Jan 2020 12:52:56 -0800 Subject: [PATCH 1/3] Create an GitHub Actions based CI Pipeline --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 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 000000000..e9b86dde4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: Continuous Integration + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python: [3.4, 3.5, 3.6, 3.7, pypy3] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.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 pylint + if: matrix.python == '3.7' + run: ./lint.sh all + - name: Test with pytest + run: pytest From 49c2f69b10c70d8ca1cfe2d49531280ec8cbe441 Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Tue, 14 Jan 2020 12:56:13 -0800 Subject: [PATCH 2/3] Temporarily removing Py3.4 --- .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 e9b86dde4..8cd37ba5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [3.4, 3.5, 3.6, 3.7, pypy3] + python: [3.5, 3.6, 3.7, pypy3] steps: - uses: actions/checkout@v1 @@ -24,4 +24,5 @@ jobs: if: matrix.python == '3.7' run: ./lint.sh all - name: Test with pytest + if: success() || failure() run: pytest From dd276ef6f3813ddeb04c102806c80f862651473d Mon Sep 17 00:00:00 2001 From: hiranya911 Date: Tue, 14 Jan 2020 14:36:18 -0800 Subject: [PATCH 3/3] Added emulator-based integration tests --- .github/workflows/ci.yml | 8 ++++++++ .travis.yml | 10 ---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cd37ba5b..ca223bd5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,3 +26,11 @@ jobs: - name: Test with pytest if: success() || failure() run: pytest + - name: Set up Node.js 10 + uses: actions/setup-node@v1 + with: + node-version: 10.x + - name: Run integration tests against emulator + run: | + npm install -g firebase-tools + firebase emulators:exec --only database --project fake-project-id 'pytest integration/test_db.py' diff --git a/.travis.yml b/.travis.yml index 8d6b9246a..8cec7e1d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,6 @@ language: python python: - "3.4" - - "3.5" - - "3.6" - - "3.7" - - "pypy3.5" - -jobs: - include: - - name: "Lint" - python: "3.7" - script: ./lint.sh all before_install: - nvm install 8 && npm install -g firebase-tools