Skip to content

Commit c61660d

Browse files
authored
Infrastructure update (#78)
* CI workflows update * Add and configure mkdocs-adr-summary-macro Signed-off-by: Federico Busetti <[email protected]>
1 parent b0c6799 commit c61660d

22 files changed

+826
-299
lines changed

.bandit.yml

Lines changed: 405 additions & 0 deletions
Large diffs are not rendered by default.

.codeclimate.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: "2"
2+
plugins:
3+
bandit:
4+
enabled: true
5+
sonar-python:
6+
enabled: true
7+
exclude_patterns:
8+
- "spec/"
9+
- "!spec/support/helpers"
10+
- "config/"
11+
- "alembic/"
12+
- "grpc_app/generated/"
13+
- "db/"
14+
- "dist/"
15+
- "features/"
16+
- "**/node_modules/"
17+
- "script/"
18+
- "**/spec/"
19+
- "**/test/"
20+
- "**/tests/"
21+
- "Tests/"
22+
- "**/vendor/"
23+
- "**/*_test.go"
24+
- "**/*.d.ts"

.github/workflows/github-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
python -m pip install --upgrade pip
3838
python -m pip install poetry
3939
poetry config virtualenvs.create false
40-
poetry install --no-root --with dev
40+
make dev-dependencies
4141
4242
- name: Build static pages
4343
run: make docs-build

.github/workflows/python-3.11.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/python-3.9.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/python-bandit.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Bandit checks
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
jobs:
15+
bandit:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Security check - Bandit
22+
uses: ioggstream/[email protected]
23+
with:
24+
project_path: .
25+
config_file: .bandit.yml
26+
27+
# This is optional
28+
- name: Security check report artifacts
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: Security report
32+
path: output/security_report.txt

.github/workflows/python-code-style.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ on:
88
branches: [ "main" ]
99
pull_request:
1010
branches: [ "main" ]
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
1113

1214
jobs:
13-
quality:
15+
format:
1416
runs-on: ubuntu-latest
1517

1618
steps:
17-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
1820
- name: Set up Python 3.11
19-
uses: actions/setup-python@v3
21+
uses: actions/setup-python@v5
2022
with:
2123
python-version: "3.11"
2224
- name: Install dependencies

.github/workflows/python-lint.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ on:
88
branches: [ "main" ]
99
pull_request:
1010
branches: [ "main" ]
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
1113

1214
jobs:
13-
quality:
15+
lint:
1416
runs-on: ubuntu-latest
1517

1618
steps:
17-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
1820
- name: Set up Python 3.11
19-
uses: actions/setup-python@v3
21+
uses: actions/setup-python@v5
2022
with:
2123
python-version: "3.11"
2224
- name: Install dependencies

.github/workflows/python-quality.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ on:
88
branches: [ "main" ]
99
pull_request:
1010
branches: [ "main" ]
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
1113

1214
jobs:
1315
quality:
1416
runs-on: ubuntu-latest
1517

1618
steps:
17-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
1820
- name: Set up Python 3.11
19-
uses: actions/setup-python@v3
21+
uses: actions/setup-python@v5
2022
with:
2123
python-version: "3.11"
2224
- name: Install dependencies
@@ -26,8 +28,7 @@ jobs:
2628
poetry config virtualenvs.create false
2729
make dev-dependencies
2830
- name: Test & publish code coverage
29-
uses: paambaati/[email protected]
30-
if: env.CC_TEST_REPORTER_ID != null
31+
uses: paambaati/[email protected]
3132
env:
3233
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_REPORTER_ID }}
3334
with:

.github/workflows/python-3.10.yml renamed to .github/workflows/python-tests.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
33

4-
name: Python 3.10
4+
name: Python tests
55

66
on:
77
push:
88
branches: [ "main" ]
99
pull_request:
1010
branches: [ "main" ]
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
1113

1214
jobs:
1315
test:
14-
runs-on: ubuntu-latest
15-
16+
strategy:
17+
matrix:
18+
version: ["3.9", "3.10", "3.11"]
19+
os: [ubuntu-latest]
20+
runs-on: ${{ matrix.os }}
1621
steps:
17-
- uses: actions/checkout@v3
18-
- name: Set up Python 3.10
19-
uses: actions/setup-python@v3
22+
- uses: actions/checkout@v4
23+
- name: Set up Python ${{ matrix.version }}
24+
uses: actions/setup-python@v5
2025
with:
21-
python-version: "3.10"
26+
python-version: "${{ matrix.version }}"
2227
- name: Install dependencies
2328
run: |
2429
python -m pip install --upgrade pip

0 commit comments

Comments
 (0)