This repository has been archived by the owner on Oct 30, 2022. It is now read-only.
/
config.yml
68 lines (66 loc) · 2.06 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: 2 # use CircleCI 2.0
workflows:
version: 2
test:
jobs:
- test-3.6
- test-3.7
- test-3.8
- check-formatting-3.7
install-venv: &install-venv
run:
name: Create virtual environment
command: |
python -m venv venv
. venv/bin/activate
pip install -e .[dev]
echo '. venv/bin/activate' >> $BASH_ENV
jobs: # A basic unit of work in a run
test-3.6: &test-template # directory where steps are run
working_directory: ~/hmt
docker: # run the steps with Docker
# CircleCI Python images available at: https://hub.docker.com/r/circleci/python/
- image: circleci/python:3.6.4-stretch
steps: # steps that comprise the `build` job
- checkout
- *install-venv
- run:
name: Install Node.js and yarn
command: |
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
sudo apt-get install -y nodejs
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
- run:
name: Install pyright and run tests
command: |
set +e
echo 'export PATH=$(yarn global bin):$PATH' >> $BASH_ENV
source $BASH_ENV
yarn global add pyright
python setup.py test
- run:
name: Run integration tests
command: |
git clone https://github.com/meeshkan/hmt-examples.git ../hmt-examples
cd ../hmt-examples && python run_all.py
check-formatting-3.7:
working_directory: ~/hmt
docker:
- image: circleci/python:3.7.6-stretch
steps:
- checkout
- *install-venv
- run:
command: |
set -eu -o pipefail
python setup.py format
test-3.7:
<<: *test-template
docker:
- image: circleci/python:3.7.6-stretch
test-3.8:
<<: *test-template
docker:
- image: circleci/python:3.8.1-buster