-
Notifications
You must be signed in to change notification settings - Fork 3
26 lines (24 loc) · 1.12 KB
/
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
name: Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build docker-compose stack
run: docker-compose -f docker-compose.ci.yml up -d
- name: Lint with flake8
run: |
docker-compose exec -T datafingerprint pip install flake8
# stop the build if there are Python syntax errors or undefined names
docker-compose exec -T datafingerprint flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
docker-compose exec -T datafingerprint flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install test requirements
run: docker-compose exec -T datafingerprint pip install -r tests/requirements.txt
- name: Test with behave
run: docker-compose exec -T datafingerprint behave tests/features
- name: Test with pytest
run: docker-compose exec -T datafingerprint python -m pytest tests/unit
- name: Check logs
run: docker-compose logs datafingerprint