Skip to content

Complete cell-SAM with two channel selection #1095

Complete cell-SAM with two channel selection

Complete cell-SAM with two channel selection #1095

Workflow file for this run

# 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: tests
on:
pull_request:
push:
branches:
- main
jobs:
e2e-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Cache pip
uses: actions/cache@v3
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('backend/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Dependencies
working-directory: backend
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-test.txt
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Cypress run
uses: cypress-io/github-action@v5
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CYPRESS_AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
CYPRESS_AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
working-directory: frontend
start: |
npm run cypress:frontend
npm run cypress:backend
wait-on: "http://localhost:3000, http://localhost:5000/health"
wait-on-timeout: 300
spec: |
cypress/e2e/label.cy.js
cypress/e2e/caliban.cy.js
cypress/e2e/spots.cy.js
cypress/e2e/celltypes.cy.js
- name: Cypress Coveralls
uses: coverallsapp/github-action@master
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
with:
base-path: frontend
path-to-lcov: frontend/coverage/lcov.info
github-token: ${{ secrets.github_token }}
flag-name: cypress
parallel: true
frontend-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache node_modules
uses: actions/cache@v3
with:
path: "frontend/**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('frontend/**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-
- name: Yarn Install
working-directory: frontend
run: yarn install --update-checksums
- name: Lint
working-directory: frontend
run: yarn lint
- name: Unit Tests
working-directory: frontend
run: yarn test --coverage
env:
CI: true
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
with:
base-path: frontend
path-to-lcov: frontend/coverage/lcov.info
github-token: ${{ secrets.github_token }}
flag-name: node-${{ matrix.node-version }}
parallel: true
backend-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v3
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('backend/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Dependencies
working-directory: backend
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-test.txt
- name: Run PyTest
working-directory: backend
run: |
PYTHONPATH=deepcell_label pytest deepcell_label --cov deepcell_label
- 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
working-directory: backend
run: |
coveralls
coveralls:
name: Finish Coveralls
needs: [e2e-tests, frontend-tests, backend-tests]
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true