Skip to content
This repository was archived by the owner on Jan 27, 2025. It is now read-only.

Commit 8860e4a

Browse files
committed
add ci
1 parent 7df7e3c commit 8860e4a

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.flake8

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SPDX-License-Identifier: MIT OR Apache-2.0
2+
# SPDX-FileCopyrightText: Ferrous Systems and AdaCore
3+
4+
# Configuration recommended by Black
5+
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
6+
7+
[flake8]
8+
max-line-length = 88
9+
extend-ignore = E203

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# SPDX-License-Identifier: MIT OR Apache-2.0
2+
# SPDX-FileCopyrightText: Ferrous Systems and AdaCore
3+
4+
---
5+
6+
name: CI
7+
on: [push, pull_request]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
lint:
14+
name: Lints
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
# Some Ferrocene builders require the use of Python 3.6. Use that on CI
20+
# to make sure there are no surprises when we import into Ferrocene.
21+
- uses: actions/setup-python@v3
22+
with:
23+
python-version: "3.6.x"
24+
25+
- name: Check that the requirements are installable
26+
run: python3 -m pip install -r requirements.txt
27+
28+
- name: Install linting dependencies
29+
run: python3 -m pip install reuse black flake8
30+
31+
- name: Verify licensing metadata
32+
run: reuse lint
33+
34+
- name: Verify Python code formatting
35+
run: black . --check --diff --color
36+
37+
- name: Lint Python code with flake8
38+
run: flake8 .

0 commit comments

Comments
 (0)