-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (84 loc) · 2.12 KB
/
test.yaml
File metadata and controls
93 lines (84 loc) · 2.12 KB
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
84
85
86
87
88
89
90
91
92
93
name: Test
on:
pull_request:
branches: [ test, main ]
push:
branches: [ test, main ]
jobs:
python-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: openforge
POSTGRES_PASSWORD: openforge
POSTGRES_DB: openforge_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .
- name: Run tests
env:
PGHOST: localhost
PGUSER: openforge
PGPASSWORD: openforge
PGDATABASE: openforge_test
PGPORT: 5432
run: |
pytest tests/ --cov=openforge
react-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
- name: Install dependencies
run: npm install
- name: Run React tests
run: npm test
js-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
- name: Install dependencies
run: npm install
- name: Run linting and type checking
run: npm run lint:all
python-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install ruff
run: |
python -m pip install --upgrade pip
pip install ruff==0.8.6
- name: Run ruff linting
run: ruff check .
- name: Run ruff formatting check
run: ruff format --check .