-
Notifications
You must be signed in to change notification settings - Fork 13
36 lines (26 loc) · 941 Bytes
/
ci.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
name: CI
on: [pull_request, workflow_call]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '2.7'
- name: Setup pip
run: curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py && sudo python2 get-pip.py
- name: Install dependencies
run: pip install -r requirements.txt
- name: Create ansible.cfg with correct roles
run: printf '[defaults]\nroles_path=../' >ansible.cfg
- name: Create symlink
run: ln -snf $PWD ../Jimdo.fastly
- name: Check source code
run: flake8 library
- name: Run tests
run: FASTLY_API_KEY=test python -m unittest discover tests
- name: Check ansible syntax
run: ansible-playbook tests/test.yml -i tests/inventory --syntax-check