2021-10-14 12:06:40 +08:00
|
|
|
version: 2.1
|
2021-10-14 12:05:40 +08:00
|
|
|
orbs:
|
2021-10-14 12:11:51 +08:00
|
|
|
codecov: codecov/codecov@3.1.1
|
2021-10-27 00:58:47 +08:00
|
|
|
node: circleci/node@4.7.0
|
2019-05-30 16:03:00 +08:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
2022-01-10 13:58:57 +08:00
|
|
|
- image: circleci/python:3.9.2-browsers
|
2019-05-30 16:03:00 +08:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run: mkdir test-reports
|
2021-08-18 02:42:30 +08:00
|
|
|
- restore_cache:
|
|
|
|
key: deps1-{{ .Branch }}-{{ checksum "gradio.egg-info/requires.txt" }}
|
2019-05-30 15:53:37 +08:00
|
|
|
- run:
|
2019-05-30 16:03:00 +08:00
|
|
|
name: Install Python deps in a venv
|
2019-05-30 15:53:37 +08:00
|
|
|
command: |
|
2019-05-30 16:03:00 +08:00
|
|
|
python3 -m venv venv
|
|
|
|
. venv/bin/activate
|
2021-08-18 02:42:30 +08:00
|
|
|
pip install --upgrade pip
|
|
|
|
pip install -r gradio.egg-info/requires.txt
|
2021-12-21 07:59:07 +08:00
|
|
|
pip install shap IPython comet_ml wandb mlflow tensorflow transformers
|
2021-11-03 04:29:24 +08:00
|
|
|
pip install selenium==4.0.0a6.post2 coverage scikit-image
|
2021-05-24 08:57:14 +08:00
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
chromedriver --version
|
|
|
|
name: Check chrome driver install
|
2021-08-18 02:42:30 +08:00
|
|
|
- save_cache:
|
|
|
|
key: deps1-{{ .Branch }}-{{ checksum "gradio.egg-info/requires.txt" }}
|
|
|
|
paths:
|
|
|
|
- "venv"
|
2021-10-27 00:58:47 +08:00
|
|
|
- node/install:
|
|
|
|
node-version: 14.17.4
|
|
|
|
npm-version: 8.1.0
|
2021-10-26 04:41:03 +08:00
|
|
|
- run:
|
|
|
|
name: Build frontend
|
|
|
|
command: |
|
|
|
|
cd frontend
|
|
|
|
npm install
|
|
|
|
npm run build
|
2020-10-23 22:28:30 +08:00
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
mkdir screenshots
|
2019-05-30 15:53:37 +08:00
|
|
|
- run:
|
|
|
|
command: |
|
2019-05-30 16:03:00 +08:00
|
|
|
. venv/bin/activate
|
2021-10-14 12:05:40 +08:00
|
|
|
coverage run -m unittest
|
2021-10-14 12:18:33 +08:00
|
|
|
coverage xml
|
2021-10-14 12:05:40 +08:00
|
|
|
- codecov/upload:
|
2021-10-14 12:18:33 +08:00
|
|
|
file: 'coverage.xml'
|
2019-05-30 16:03:00 +08:00
|
|
|
- store_artifacts:
|
2020-10-23 22:28:30 +08:00
|
|
|
path: /home/circleci/project/test/tmp
|
|
|
|
destination: screenshots
|
2019-05-30 16:03:00 +08:00
|
|
|
- store_test_results:
|
2021-02-18 01:50:11 +08:00
|
|
|
path: test-reports/
|