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
|
2022-02-04 20:23:11 +08:00
|
|
|
bash scripts/install_test_requirements.sh
|
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
|
2022-02-09 01:23:59 +08:00
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
. venv/bin/activate
|
2022-02-09 14:18:46 +08:00
|
|
|
coverage run -m pytest
|
2021-10-14 12:18:33 +08:00
|
|
|
coverage xml
|
2022-02-09 16:08:01 +08:00
|
|
|
- run:
|
|
|
|
command: |
|
2022-02-09 18:37:25 +08:00
|
|
|
. venv/bin/activate
|
2022-02-09 16:08:01 +08:00
|
|
|
python -m black --check gradio test
|
2022-02-09 19:55:18 +08:00
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
. venv/bin/activate
|
2022-02-09 22:32:43 +08:00
|
|
|
python -m isort --profile=black --check-only gradio test
|
2022-02-09 19:55:18 +08:00
|
|
|
- run:
|
|
|
|
command: |
|
|
|
|
. venv/bin/activate
|
2022-02-10 03:52:26 +08:00
|
|
|
python -m flake8 --ignore=E731,E501,E722,W503,E126,F401 gradio test
|
2021-10-14 12:05:40 +08:00
|
|
|
- codecov/upload:
|
2022-02-09 01:23:59 +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/
|