-
Notifications
You must be signed in to change notification settings - Fork 589
52 lines (48 loc) · 1.32 KB
/
unit-tests.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
name: unit-tests
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
# Backend tests (Python/Flask)
Python:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
python-version: ['3.8', '3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install pipenv
pipenv install -d
pipenv install -r test_requirements.txt
- name: Run unit tests
run: |
pipenv run python run_tests.py
# Frontend tests (VueJS)
VueJS:
runs-on: ubuntu-latest
defaults:
run:
working-directory: timesketch/frontend
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
node-version: ["18"]
steps:
- uses: actions/checkout@v2
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
sudo apt install yarn npm --no-install-recommends
yarn install
- name: Run unit tests with yarn
run: yarn run test:unit