Skip to content

Commit 91dc181

Browse files
.github/workflows: Add checks for GitHub PRs
Adds linter, unittests and copyright checks for public GitHub PRs Change-Id: Ifa1d145a5b321e79bc0354784cf47970ab0008c1
1 parent cbb7970 commit 91dc181

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/pr_checks.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Run checks on PR
2+
on:
3+
push:
4+
branches: [ "trunk" ]
5+
pull_request:
6+
branches: [ "trunk" ]
7+
8+
jobs:
9+
Linter:
10+
runs-on: ubuntu-latest
11+
container:
12+
image: python:3.12
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Prepare python environment
16+
run: |
17+
pip install --no-cache-dir "cython<3.0.0"
18+
pip install --no-cache-dir -r requirements.txt -r requirements-dev.txt
19+
pip install .
20+
- name: Run linter
21+
run: flake8 .
22+
23+
Test-Runner:
24+
runs-on: ubuntu-latest
25+
container:
26+
image: python:3.12
27+
steps:
28+
- uses: actions/checkout@v4
29+
- name: Prepare python environment
30+
run: |
31+
pip install --no-cache-dir "cython<3.0.0"
32+
pip install --no-cache-dir -r requirements.txt -r requirements-dev.txt
33+
pip install .
34+
- name: Run Tests
35+
run: pytest
36+
37+
Copyright:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Run copyright checker
42+
run: ./check_copyright.sh

0 commit comments

Comments
 (0)