-
Notifications
You must be signed in to change notification settings - Fork 8
77 lines (73 loc) · 2.47 KB
/
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Unit Tests
on: [push]
jobs:
backend-tests:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install TIRA Python Client from Repo
working-directory: ${{github.workspace}}/python-client
run: |
# Install tira from the repository since the pip version may not be up-to-date enough.
# The install musst be editable (-e) since importing from tira fails otherwise
pip3 install .[dev,test]
- name: Install dependencies
working-directory: ${{github.workspace}}/application
run: |
pip3 install .[dev,test]
make setup
env:
TIRA_ROOT: ${{github.workspace}}/model/src
TIRA_CONFIG: ${{github.workspace}}/application/config/tira-application-config.yml
DISCOURSE_API_KEY: "I am so secret"
- name: Run backend tests
working-directory: ${{github.workspace}}/application/test
run: pytest
frontend-tests:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
working-directory: ${{github.workspace}}/frontend
run: yarn --frozen-lockfile
- name: Run frontend tests
working-directory: ${{github.workspace}}/frontend
run: yarn test
python-client-test:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install Dependencies
working-directory: ${{github.workspace}}/python-client
run: |
sudo apt-get install -y openjdk-11-jdk
pip3 install .[test,dev]
- name: Running Tests
working-directory: ${{github.workspace}}/python-client
run: |
echo running on branch ${GITHUB_REF##*/}
pytest