-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (49 loc) · 1.51 KB
/
ci-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
53
54
55
56
57
58
59
60
61
62
name: UGent-3
run-name: ${{ github.actor }} is running tests 🚀
on: [push, pull_request]
jobs:
Frontend-tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Install dependencies
working-directory: ./frontend
run: npm ci
- name: Build
working-directory: ./frontend
run: npm run build
- name: Preview Web App
working-directory: ./frontend
run: npm run preview &
- name: Running tests
working-directory: ./frontend
run: npm test
- name: Run linting
working-directory: ./frontend
run: npm run lint
Backend-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip'
- name: Install dependencies
working-directory: ./backend
run: pip3 install -r requirements.txt && pip3 install -r dev-requirements.txt
- name: Running tests
working-directory: ./backend
run: bash ./run_tests.sh
- name: Run linting
working-directory: ./backend
run: find . -type f -name "*.py" | xargs pylint