gradio/.circleci/config.yml

70 lines
1.9 KiB
YAML
Raw Normal View History

2021-10-13 23:06:40 -05:00
version: 2.1
2021-10-13 23:05:40 -05:00
orbs:
2022-04-18 11:22:45 -07:00
codecov: codecov/codecov@3.2.2
2021-10-26 16:58:47 +00:00
node: circleci/node@4.7.0
2019-05-30 01:03:00 -07:00
jobs:
build:
docker:
2022-01-09 23:58:57 -06:00
- image: circleci/python:3.9.2-browsers
2019-05-30 01:03:00 -07:00
steps:
- checkout
- run: mkdir test-reports
2021-08-17 18:42:30 +00:00
- restore_cache:
key: deps1-{{ .Branch }}-{{ checksum "gradio.egg-info/requires.txt" }}
- run:
name: Install ffmpeg
command: |
sudo apt update
sudo apt install ffmpeg -y
2019-05-30 00:53:37 -07:00
- run:
2019-05-30 01:03:00 -07:00
name: Install Python deps in a venv
2019-05-30 00:53:37 -07:00
command: |
2019-05-30 01:03:00 -07:00
python3 -m venv venv
. venv/bin/activate
bash scripts/install_test_requirements.sh
2021-05-23 20:57:14 -04:00
- run:
command: |
chromedriver --version
name: Check chrome driver install
2021-08-17 18:42:30 +00:00
- save_cache:
key: deps1-{{ .Branch }}-{{ checksum "gradio.egg-info/requires.txt" }}
paths:
- "venv"
2021-10-26 16:58:47 +00: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
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
- run:
command: |
. venv/bin/activate
coverage run -m pytest
coverage xml
2021-10-13 23:05:40 -05:00
- codecov/upload:
file: 'coverage.xml'
2019-05-30 01:03:00 -07:00
- store_artifacts:
path: /home/circleci/project/test/tmp
destination: screenshots
2019-05-30 01:03:00 -07:00
- store_test_results:
2021-02-17 09:50:11 -08:00
path: test-reports/