Skip to content

Commit e8c9e7f

Browse files
Add CI/CD actions (#3)
chore: Add CI config items and project dependency management
1 parent 7bad52f commit e8c9e7f

File tree

13 files changed

+710
-15
lines changed

13 files changed

+710
-15
lines changed

.github/pull_request_template.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ Including output from tests may require access to a TFE instance. Ignore this se
4444
<!--
4545
_Please run the tests locally for any files you changes and include the output here._
4646
-->
47-
```
48-
...
49-
```
5047

51-
<!-- heimdall_github_prtemplate:grc-pci_dss-2024-01-05 -->
5248
## Rollback Plan
5349

5450
<!--
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [main]
17+
pull_request:
18+
schedule:
19+
- cron: "15 2 * * 2"
20+
21+
jobs:
22+
analyze:
23+
name: Analyze
24+
runs-on: ubuntu-latest
25+
permissions:
26+
actions: read
27+
contents: read
28+
security-events: write
29+
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
language: ["python"]
34+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
35+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
36+
37+
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.1.6
40+
41+
# Initializes the CodeQL tools for scanning.
42+
- name: Initialize CodeQL
43+
uses: github/codeql-action/init@9a866ed4524fc3422c3af1e446dab8efa3503411 # codeql-bundle-20230418
44+
with:
45+
languages: ${{ matrix.language }}
46+
# If you wish to specify custom queries, you can do so here or in a config file.
47+
# By default, queries listed here will override any specified in a config file.
48+
# Prefix the list here with "+" to use these queries and those in the config file.
49+
50+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
51+
# queries: security-extended,security-and-quality
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@9a866ed4524fc3422c3af1e446dab8efa3503411 # codeql-bundle-20230418
57+
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
60+
61+
# If the Autobuild fails above, remove it and uncomment the following three lines.
62+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
63+
64+
# - run: |
65+
# echo "Run, Build Application using script"
66+
# ./location_of_script_within_repo/buildscript.sh
67+
68+
- name: Perform CodeQL Analysis
69+
uses: github/codeql-action/analyze@9a866ed4524fc3422c3af1e446dab8efa3503411 # codeql-bundle-20230418

.github/workflows/lint.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ["3.10", "3.11", "3.12", "3.13"]
14+
15+
steps:
16+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
17+
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
make dev-install
27+
28+
- name: Run code quality checks
29+
run: |
30+
make check

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ["3.10", "3.11", "3.12", "3.13"]
14+
15+
steps:
16+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
17+
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
make dev-install
27+
28+
- name: Run tests
29+
run: |
30+
make test

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ htmlcov
1111
.venv
1212
.pyre
1313
.pytest_cache/
14+
.mypy_cache/
15+
.ruff_cache/
1416

1517
# Visual Studio Code
1618
.vscode/

0 commit comments

Comments
 (0)