-
Notifications
You must be signed in to change notification settings - Fork 22
83 lines (79 loc) · 2.27 KB
/
tests.yaml
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
82
83
name: Ibutsu tests
on:
push:
branches:
- main
pull_request:
types: ["opened", "synchronize", "reopened"]
create:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- name: Install dependencies
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all --verbose
lint-test-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: 'frontend/.nvmrc'
cache: 'yarn'
cache-dependency-path: 'frontend/yarn.lock'
- run: yarn install
working-directory: ./frontend
- run: yarn lint
working-directory: ./frontend
- run: yarn test
working-directory: ./frontend
test-backend:
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11"] # five is broken on 3.11 - celery update needed "3.11.0-alpha - 3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install backend dependencies with Python ${{ matrix.python-version }}
working-directory: ./backend
run: |
python -m pip install --upgrade pip wheel
pip install -U -e .[test]
- name: Run backend tests
working-directory: ./backend
run: pytest
build-backend:
runs-on: ubuntu-latest
needs: test-backend
strategy:
matrix:
app: [backend, scheduler, worker]
steps:
- uses: actions/checkout@v4
- name: Build image ${{ matrix.app }}
uses: redhat-actions/buildah-build@v2
with:
context: ./backend
image: ibutsu-${{ matrix.app }}
dockerfiles: |
./backend/docker/Dockerfile.${{ matrix.app }}
build-frontend:
runs-on: ubuntu-latest
needs: lint-test-frontend
steps:
- uses: actions/checkout@v4
- name: Build frontend image
uses: redhat-actions/buildah-build@v2
with:
context: ./frontend
image: ibutsu-frontend
dockerfiles: |
./frontend/docker/Dockerfile.frontend