-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (62 loc) · 1.72 KB
/
testing.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
name: Testing
on:
pull_request:
branches:
- master
jobs:
api:
name: API
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Pull Docker images
run: docker-compose pull
- name: Bring backing containers online
run: docker-compose up -d scylla elasticsearch janusgraph
- name: Pull latest
run: docker pull josiahwolfoberholtzer/on-exactitude-in-science-api:latest
- name: Build API container
run: docker-compose build api
- name: Run black
run: |
docker-compose run --rm api black --version
docker-compose run --rm api make black-check
- name: Run flake8
run: |
docker-compose run --rm api flake8 --version
docker-compose run --rm api make flake8
- name: Run mypy
run: |
docker-compose run --rm api mypy --version
docker-compose run --rm api make mypy
- name: Wait for JanusGraph
run: docker-compose run --rm janusgraph-healthcheck
- name: Load schema
run: docker-compose run --rm api python3 -m maps schema --graph testgraph load
- name: Run pytest
run: |
docker-compose run --rm api pytest --version
docker-compose run --rm api make pytest
- name: Dump Docker logs
if: ${{ failure() }}
run: docker-compose logs
- name: Stop containers
if: ${{ always() }}
run: docker-compose stop
gui:
name: GUI
runs-on: ubuntu-latest
defaults:
run:
working-directory: gui
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12'
- name: Install
run: yarn install
- name: Lint
run: yarn lint
- name: Test
run: yarn test