forked from UUDigitalHumanitieslab/gretel
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (76 loc) · 2.4 KB
/
test.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Tests
on:
workflow_dispatch:
push:
branches:
- 'develop'
- 'master'
- 'feature/**'
- 'bugfix/**'
- 'hotfix/**'
- 'release/**'
pull_request:
branches:
- 'develop'
- 'main'
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.8']
node-version: ['16.x']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python-version }}"
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: "${{ matrix.node-version }}"
- name: Install Ubuntu packages
run: |
sudo apt-get update
sudo apt-get install basex
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install virtualenv
virtualenv .venv
source .venv/bin/activate
pip install -r backend/requirements.txt
- name: Lint with flake8
run: |
cd backend
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Type checking with mypy
run: |
source .venv/bin/activate
cd backend
pip install django-stubs[compatible-mypy]
pip install djangorestframework-stubs
mypy .
# by default mypy will only check code that is inside type annotated functions
# to check everything run this instead:
# mypy . --check-untyped-defs
- name: Run all tests
run: |
basexserver -S
cat bootstrap_ci.txt | python bootstrap.py
yarn
yarn django migrate
yarn static-p
find static
yarn start-back-p &
chromedriver --version
yarn test-back --ignore-glob=**/mwe-query/*
yarn test-front
yarn test-func