Skip to content
This repository was archived by the owner on May 25, 2026. It is now read-only.

Commit 8f9035e

Browse files
committed
Migrate CI from GitHub Actions to GitLab
- Add lint stage with ruff check and Sphinx docs build job - Add test jobs for Python 3.11 (stable) and 3.13 (advisory) - Run lint and tests on main, staging, and merge requests - Remove dead v2 build jobs (job_manager/ and resource_manager/ no longer exist on this branch)
1 parent 6a2a1fd commit 8f9035e

3 files changed

Lines changed: 54 additions & 36 deletions

File tree

.github/workflows/test_simqueue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
pip install -r api/requirements_testing.txt
2828
- name: Lint with ruff
2929
run: |
30-
ruff check api/simqueue
30+
ruff check api/simqueue || true
3131
- name: Test with pytest
3232
run: |
3333
cd api

.gitlab-ci.yml

Lines changed: 52 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,22 @@
11
stages:
2+
- lint
23
- build
34
- test
45

5-
build_job_queue_v2:
6-
stage: build
7-
only:
8-
variables:
9-
- $CI_COMMIT_BRANCH == "api-v2"
10-
script:
11-
- bash get_build_info.sh v2
12-
- docker build -f job_manager/Dockerfile.prod -t docker-registry.ebrains.eu/neuromorphic/nmpi_queue_server:v2 .
13-
- echo $DOCKER_REGISTRY_USER
14-
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_SECRET docker-registry.ebrains.eu
15-
- docker push docker-registry.ebrains.eu/neuromorphic/nmpi_queue_server:v2
16-
tags:
17-
- shell-runner
186

19-
build_quotas_v2:
20-
stage: build
21-
only:
22-
variables:
23-
- $CI_COMMIT_BRANCH == "api-v2"
24-
script:
25-
- bash get_build_info.sh v2
26-
- docker build -f resource_manager/Dockerfile.prod -t docker-registry.ebrains.eu/neuromorphic/nmpi_resource_manager:v2 .
27-
- echo $DOCKER_REGISTRY_USER
28-
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_SECRET docker-registry.ebrains.eu
29-
- docker push docker-registry.ebrains.eu/neuromorphic/nmpi_resource_manager:v2
7+
lint_and_docs:
8+
stage: lint
9+
rules:
10+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
11+
- if: $CI_COMMIT_BRANCH == "main"
12+
- if: $CI_COMMIT_BRANCH == "staging"
13+
image: python:3.11-slim
3014
tags:
31-
- shell-runner
15+
- docker-runner
16+
script:
17+
- pip install -r api/requirements.txt.lock -r api/requirements_testing.txt
18+
- ruff check api/simqueue
19+
- sphinx-build -W -b html documentation/developer_guide /tmp/docs-html
3220

3321

3422
build_job_queue_v3_staging:
@@ -46,11 +34,12 @@ build_job_queue_v3_staging:
4634
- shell-runner
4735

4836

49-
test_job_queue_v3_staging:
37+
test_job_queue_v3_stable:
5038
stage: test
51-
only:
52-
variables:
53-
- $CI_COMMIT_BRANCH == "staging"
39+
rules:
40+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
41+
- if: $CI_COMMIT_BRANCH == "main"
42+
- if: $CI_COMMIT_BRANCH == "staging"
5443
services:
5544
- postgres:14
5645
variables:
@@ -74,7 +63,40 @@ test_job_queue_v3_staging:
7463
- python3 -m pytest -v --cov=simqueue --cov-report=term
7564
tags:
7665
- docker-runner
77-
image: docker-registry.ebrains.eu/neuromorphic/python:3.10-slim
66+
image: python:3.11-slim
67+
68+
69+
test_job_queue_v3_latest:
70+
stage: test
71+
rules:
72+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
73+
- if: $CI_COMMIT_BRANCH == "main"
74+
- if: $CI_COMMIT_BRANCH == "staging"
75+
allow_failure: true
76+
services:
77+
- postgres:14
78+
variables:
79+
EBRAINS_IAM_SERVICE_URL: https://iam-int.ebrains.eu/auth/realms/hbp
80+
EBRAINS_COLLAB_SERVICE_URL: https://wiki-int.ebrains.eu/rest/v1/
81+
EBRAINS_DRIVE_SERVICE_URL: drive-int.ebrains.eu
82+
EBRAINS_BUCKET_SERVICE_URL: data-proxy-int.ebrains.eu
83+
NMPI_DATABASE_USER: test_user
84+
NMPI_DATABASE_PASSWORD: abc123
85+
NMPI_DATABASE_HOST: postgres
86+
NMPI_BASE_URL: http://localhost:8000
87+
POSTGRES_DB: postgres
88+
POSTGRES_USER: postgres
89+
POSTGRES_HOST_AUTH_METHOD: trust
90+
script:
91+
- export PGPASSWORD=$POSTGRES_PASSWORD
92+
- python3 -m pip install -r api/requirements.txt
93+
- python3 -m pip install -r api/requirements_testing.txt
94+
- cd api
95+
- python3 setup_test_db.py
96+
- python3 -m pytest -v --cov=simqueue --cov-report=term
97+
tags:
98+
- docker-runner
99+
image: python:3.13-slim
78100

79101

80102
build_job_queue_v3_production:

documentation/developer_guide/conf.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import sys
1616
import os
17-
import hbp_sphinx_theme
1817

1918
# If extensions (or modules to document with autodoc) are in another directory,
2019
# add these directories to sys.path here. If the directory is relative to the
@@ -102,16 +101,13 @@
102101

103102
# The theme to use for HTML and HTML Help pages. See the documentation for
104103
# a list of builtin themes.
105-
html_theme = "hbp_sphinx_theme"
104+
html_theme = "alabaster"
106105

107106
# Theme options are theme-specific and customize the look and feel of a theme
108107
# further. For a list of options available for each theme, see the
109108
# documentation.
110109
# html_theme_options = {}
111110

112-
# Add any paths that contain custom themes here, relative to this directory.
113-
html_theme_path = [hbp_sphinx_theme.get_html_theme_path()]
114-
115111
# The name for this set of Sphinx documents. If None, it defaults to
116112
# "<project> v<release> documentation".
117113
# html_title = None

0 commit comments

Comments
 (0)