forked from serverless/serverless-python-requirements
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
50 lines (50 loc) · 1.77 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
45
46
47
48
49
50
version: 2
jobs:
build:
working_directory: ~/sls-py-req
machine:
image: circleci/classic
steps:
- checkout
# Build python3.6. gross. (based on my gist here: https://git.io/vxMFG )
- run: |
sudo apt-get update
sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz
tar xf Python-3.6.5.tar.xz
cd Python-3.6.5
./configure
make
sudo make altinstall
# install bats
- run: |
git clone https://github.com/sstephenson/bats.git
cd bats
sudo ./install.sh /usr/local
# other deps
- run: sudo apt -y update && sudo apt -y install python-pip python2.7 curl unzip
# upgrade python3.6 pip to latest
- run: sudo python3.6 -m pip install -U pip
# instal pipenv
- run: sudo python3.6 -m pip install pipenv pip-tools
# install poetry
- run: |
curl https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
python get-poetry.py --preview --yes
rm get-poetry.py
# install nodejs
- run: curl -sL https://deb.nodesource.com/setup_6.x | sudo bash - && sudo apt -y install nodejs
# install serverless & depcheck
- run: npm install -g serverless depcheck
# install deps
- run: npm i
# depcheck
- run: depcheck .
# lint:
- run: npm run lint
# test!
- run: |
export PATH="$HOME/.poetry/bin:$PATH"
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
npm run test