Skip to content

Commit

Permalink
ci: added python linting to enforce code quality; issue mit-dci#264
Browse files Browse the repository at this point in the history
This commit made with the assistance of github copilot

Signed-off-by: Morgan Rockett <[email protected]>
  • Loading branch information
rockett-m committed Jun 28, 2024
1 parent 541f006 commit b0e9dee
Show file tree
Hide file tree
Showing 13 changed files with 742 additions and 84 deletions.
37 changes: 29 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
jobs:
build-release:
name: Build Release Candidate
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
BUILD_RELEASE: 1
steps:
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Setup Local Dependencies
run: ./scripts/setup-dependencies.sh
- name: Build
run: scripts/build.sh
run: ./scripts/build.sh
lint:
name: Lint
runs-on: ubuntu-20.04
Expand All @@ -43,12 +43,32 @@ jobs:
- name: Setup Local Dependencies
run: ./scripts/setup-dependencies.sh
- name: Build
run: scripts/build.sh
run: ./scripts/build.sh
- name: Lint
run: scripts/lint.sh
run: ./scripts/lint.sh
pylint:
name: Pylint
runs-on: ubuntu-22.04
continue-on-error: true
timeout-minutes: 10
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup Build Env
run: sudo ./scripts/install-build-tools.sh
- name: Lint with Pylint
run: ./scripts/pylint.sh
unit-and-integration-test:
name: Unit and Integration Tests
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
Expand All @@ -59,9 +79,9 @@ jobs:
- name: Setup Local Dependencies
run: ./scripts/setup-dependencies.sh
- name: Build
run: scripts/build.sh
run: ./scripts/build.sh
- name: Run Unit Tests
run: scripts/test.sh
run: ./scripts/test.sh
- name: Shorten SHA
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
Expand All @@ -76,7 +96,7 @@ jobs:
retention-days: 7
doxygen:
name: doxygen
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -94,3 +114,4 @@ jobs:
name: OpenCBDC Transaction Processor docs for ${{ steps.vars.outputs.sha_short }}
path: ./doxygen_generated/html/*
retention-days: 7

1 change: 0 additions & 1 deletion .github/workflows/docker-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
with:
files: |
Dockerfile
**/configure.sh
########################
# Build Base #
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ CMakeCache.txt
*.o-*
*.a
*.log
*.tgz

leveldb*/
NuRaft*/
Expand All @@ -54,7 +55,6 @@ plots/
blocks.dat
test_db


# System files
.DS_Store
.dirstamp
Expand All @@ -72,3 +72,6 @@ build/tests

# E2E Test results
testruns/

# Virtualenv
.py_venv/
Loading

0 comments on commit b0e9dee

Please sign in to comment.