Skip to content

Commit 008596f

Browse files
committed
add GitHub action
1 parent 994365a commit 008596f

1 file changed

Lines changed: 121 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# SPDX-FileCopyrightText: 2025 DESY and the Constellation authors
2+
# SPDX-License-Identifier: CC0-1.0
3+
4+
name: Constellation GitHub CI Pipeline
5+
6+
on:
7+
push:
8+
branches: [ '**' ]
9+
pull_request:
10+
11+
jobs:
12+
lint-mypy:
13+
name: Lint (mypy)
14+
runs-on: ubuntu-latest
15+
container:
16+
image: tollerort.desy.de/hub.docker.com/python:3.11
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python virtualenv
21+
run: |
22+
python3 -m venv venv
23+
source venv/bin/activate
24+
pip install --upgrade pip setuptools
25+
pip install --no-build-isolation -e .[dev]
26+
27+
- name: Run mypy
28+
run: |
29+
source venv/bin/activate
30+
mypy src/
31+
32+
format-black:
33+
name: Format Check (black)
34+
runs-on: ubuntu-latest
35+
container:
36+
image: tollerort.desy.de/hub.docker.com/python:3.11
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Set up Python virtualenv
41+
run: |
42+
python3 -m venv venv
43+
source venv/bin/activate
44+
pip install --upgrade pip setuptools
45+
pip install --no-build-isolation -e .[dev]
46+
47+
- name: Check black formatting
48+
run: |
49+
source venv/bin/activate
50+
black --check src/
51+
52+
format-isort:
53+
name: Format (isort)
54+
runs-on: ubuntu-latest
55+
container:
56+
image: tollerort.desy.de/hub.docker.com/python:3.11
57+
steps:
58+
- uses: actions/checkout@v4
59+
60+
- name: Set up Python virtualenv
61+
run: |
62+
python3 -m venv venv
63+
source venv/bin/activate
64+
pip install --upgrade pip setuptools
65+
pip install --no-build-isolation -e .[dev]
66+
67+
- name: Check isort formatting
68+
run: |
69+
source venv/bin/activate
70+
isort --check .
71+
72+
format-flake8:
73+
name: Format (flake8)
74+
runs-on: ubuntu-latest
75+
container:
76+
image: tollerort.desy.de/hub.docker.com/python:3.11
77+
steps:
78+
- uses: actions/checkout@v4
79+
80+
- name: Set up Python virtualenv
81+
run: |
82+
python3 -m venv venv
83+
source venv/bin/activate
84+
pip install --upgrade pip setuptools
85+
pip install --no-build-isolation -e .[dev]
86+
87+
- name: Run flake8
88+
run: |
89+
source venv/bin/activate
90+
flake8 src/
91+
92+
format-reuse:
93+
name: Format (reuse)
94+
runs-on: ubuntu-latest
95+
container:
96+
image: tollerort.desy.de/hub.docker.com/fsfe/reuse:latest
97+
steps:
98+
- uses: actions/checkout@v4
99+
100+
- name: Run reuse lint
101+
run: reuse lint
102+
103+
format-codespell:
104+
name: Format (codespell)
105+
runs-on: ubuntu-latest
106+
container:
107+
image: tollerort.desy.de/hub.docker.com/python:3.11
108+
steps:
109+
- uses: actions/checkout@v4
110+
111+
- name: Set up Python virtualenv
112+
run: |
113+
python3 -m venv venv
114+
source venv/bin/activate
115+
pip install --upgrade pip setuptools
116+
pip install --no-build-isolation -e .[dev]
117+
118+
- name: Run codespell
119+
run: |
120+
source venv/bin/activate
121+
codespell

0 commit comments

Comments
 (0)