gradio/.circleci/config.yml
Ömer Faruk Özdemir b9e5950bce Format-The-Codebase
- fix circleci config
2022-02-09 11:07:08 +03:00

58 lines
1.6 KiB
YAML

version: 2.1
orbs:
codecov: codecov/codecov@3.1.1
node: circleci/node@4.7.0
jobs:
build:
docker:
- image: circleci/python:3.9.2-browsers
steps:
- checkout
- run: mkdir test-reports
- restore_cache:
key: deps1-{{ .Branch }}-{{ checksum "gradio.egg-info/requires.txt" }}
- run:
name: Install Python deps in a venv
command: |
python3 -m venv venv
. venv/bin/activate
bash scripts/install_test_requirements.sh
- run:
command: |
chromedriver --version
name: Check chrome driver install
- save_cache:
key: deps1-{{ .Branch }}-{{ checksum "gradio.egg-info/requires.txt" }}
paths:
- "venv"
- node/install:
node-version: 14.17.4
npm-version: 8.1.0
- run:
name: Build frontend
command: |
cd frontend
npm install
npm run build
- run:
command: |
mkdir screenshots
- run:
command: |
python -m black --check gradio test
python -m isort --check-only gradio test
python -m flake8 --max-line-length=160 gradio test
- run:
command: |
. venv/bin/activate
coverage run -m pytest
coverage xml
- codecov/upload:
file: 'coverage.xml'
- store_artifacts:
path: /home/circleci/project/test/tmp
destination: screenshots
- store_test_results:
path: test-reports/