Skip to content

Commit

Permalink
Merge tests into a single workflow to join the coverage reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
willgraf committed Jul 16, 2021
1 parent 702c717 commit d96f302
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 72 deletions.
66 changes: 0 additions & 66 deletions .github/workflows/test-backend.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Frontend Tests
name: Tests

on: [push, pull_request]

jobs:
tests:

frontend-tests:
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -54,16 +55,58 @@ jobs:
flag-name: node-${{ matrix.node-version }}
parallel: true

# TODO: how to combine frontend/backend coverage
# or separate into 2 different reports.
backend-tests:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-test.txt
- name: Run PyTest
run: |
pytest deepcell_label --cov deepcell_label --pep8
- name: Coveralls
if: env.COVERALLS_REPO_TOKEN != null
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_FLAG_NAME: python-${{ matrix.python-version }}
COVERALLS_PARALLEL: true
run: |
coveralls
coveralls:
name: Finish Coveralls
needs: tests
needs: [frontend-tests, backend-tests]
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
base-path: visualizer
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

0 comments on commit d96f302

Please sign in to comment.