Skip to content

Commit 299adc1

Browse files
committed
feat: backend ci
1 parent 2d1b273 commit 299adc1

File tree

2 files changed

+58
-2
lines changed

2 files changed

+58
-2
lines changed

Diff for: .github/workflows/backend.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Backend CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
8+
jobs:
9+
persistence-unit-tests:
10+
name: Unit tests for persistence functions
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.10"
21+
22+
- name: Cache pip dependencies
23+
uses: actions/cache@v3
24+
with:
25+
path: ~/.cache/pip
26+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
27+
restore-keys: |
28+
${{ runner.os }}-pip-
29+
30+
- name: Give execution permissions to script
31+
run: chmod +x tests_runners/persistence/locally.sh
32+
33+
- name: Run tests
34+
run: tests_runners/persistence/locally.sh

Diff for: .github/workflows/frontend.yml

+24-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ on:
66
- "**"
77

88
jobs:
9-
build-and-test:
9+
test:
10+
name: Unit and snapshot tests
1011
runs-on: ubuntu-latest
1112

1213
steps:
@@ -28,5 +29,26 @@ jobs:
2829
- name: Run tests
2930
run: npm run test
3031

31-
- name: Build project (prod)
32+
build:
33+
name: Build the project like on production deployment
34+
needs: test
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v4
40+
41+
- name: Copy the config file for the vis
42+
run: cp config.example.js config.js
43+
44+
- name: Setup Node.JS
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: 18
48+
cache: "npm"
49+
50+
- name: Install all project dependencies
51+
run: npm ci
52+
53+
- name: Build the project (prod)
3254
run: npx webpack

0 commit comments

Comments
 (0)