gradio/.circleci/config.yml

65 lines
1.8 KiB
YAML
Raw Normal View History

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
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
- run:
name: Build frontend
command: |
npm i pnpm -g
cd ui
pnpm i --frozen-lockfile
pnpm build
- run:
command: |
mkdir screenshots
- run:
command: |
. venv/bin/activate
coverage run -m pytest
2021-10-14 12:18:33 +08:00
coverage xml
- run:
command: |
. venv/bin/activate
python -m black --check gradio test
- run:
command: |
. venv/bin/activate
python -m isort --profile=black --check-only gradio test
- run:
command: |
. venv/bin/activate
python -m flake8 --ignore=E731,E501,E722,W503,E126,F401,E203 gradio test
2021-10-14 12:05:40 +08:00
- codecov/upload:
file: 'coverage.xml'
2019-05-30 16:03:00 +08:00
- store_artifacts:
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/