Skip to content

Commit f4c0891

Browse files
committed
Add Github CI workflow based on the .gitlab-ci.yml file
1 parent a6684e5 commit f4c0891

2 files changed

Lines changed: 83 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Python test setup
2+
description: Shared Python and venv setup for CI test jobs
3+
runs:
4+
using: composite
5+
# This is a local composite action (stored in this repo), used by jobs in
6+
# .github/workflows/ci.yml to avoid repeating the same setup commands.
7+
steps:
8+
- name: Set up Python
9+
uses: actions/setup-python@v6
10+
with:
11+
python-version: "3.13"
12+
13+
# Shared commands that run before each job's test-specific commands.
14+
- name: Setup venv and test dependencies
15+
shell: bash
16+
run: |
17+
gcc --version
18+
python3 -V
19+
python3 -m venv .venv
20+
source .venv/bin/activate
21+
pip install --upgrade pip
22+
pip install -r requirements-test.txt

.github/workflows/ci.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test_package_cmake:
9+
runs-on: ubuntu-latest
10+
continue-on-error: true
11+
steps:
12+
- uses: actions/checkout@v6
13+
# Shared setup is implemented as a local composite action to avoid repeating the same commands in each job.
14+
- uses: ./.github/actions/python-test-setup
15+
16+
- name: CMake package test
17+
run: |
18+
git --version
19+
pip install cmake
20+
cmake --version
21+
make test_package_cmake
22+
23+
test_package_python:
24+
runs-on: ubuntu-latest
25+
continue-on-error: true
26+
steps:
27+
- uses: actions/checkout@v6
28+
# Shared setup is implemented as a local composite action to avoid repeating the same commands in each job.
29+
- uses: ./.github/actions/python-test-setup
30+
31+
- name: Python package test
32+
run: |
33+
.venv/bin/pip install ./traffic_signaling
34+
make test_package_python
35+
36+
test_optimizer:
37+
runs-on: ubuntu-latest
38+
continue-on-error: true
39+
steps:
40+
- uses: actions/checkout@v6
41+
# Shared setup is implemented as a local composite action to avoid repeating the same commands in each job.
42+
- uses: ./.github/actions/python-test-setup
43+
44+
- name: Optimizer tests
45+
run: |
46+
.venv/bin/pip install -r requirements.txt
47+
make test_optimizer
48+
49+
test_experiments:
50+
runs-on: ubuntu-latest
51+
continue-on-error: true
52+
steps:
53+
- uses: actions/checkout@v6
54+
# Shared setup is implemented as a local composite action to avoid repeating the same commands in each job.
55+
- uses: ./.github/actions/python-test-setup
56+
57+
- name: Experiments tests
58+
run: |
59+
.venv/bin/pip install -r requirements.txt
60+
cd experiments
61+
make test

0 commit comments

Comments
 (0)