forked from electricitymaps/electricitymaps-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
44 lines (44 loc) · 1.34 KB
/
circle.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
version: 2
executorType: machine
stages:
build:
workDir: ~/electricitymap
steps:
- type: checkout
- type: shell
name: Show versions
command: |
docker --version
docker-compose --version
- type: shell
name: Lint
command: |
set -exu
pip install pylint
sudo apt-get install libxml2-dev libxslt1-dev python-dev
pip install -r parsers/requirements.txt
pylint -E parsers/*.py
- type: shell
name: Build
command: |
set -exu
touch secrets.env
docker-compose build
docker-compose run web npm run build-release
- type: shell
name: Start environment
command: |
set -exu
docker-compose up -d
sleep 20
docker-compose logs web
- type: shell
name: Run tests
command: |
docker-compose ps
curl --fail -i http://localhost:8000/
curl --fail -i http://localhost:8000/v1/co2?countryCode=FR
curl --fail -i http://localhost:8000/v1/exchanges?countryCode=FR
curl --fail -i http://localhost:8000/v1/production?countryCode=FR
curl --fail -i http://localhost:8000/v1/price?countryCode=FR
curl --fail -i http://localhost:8000/v2/history?countryCode=FR