Skip to content

Commit

Permalink
feat (#321): add commit-linter
Browse files Browse the repository at this point in the history
Add commit-linter to CI-pipeline.
  • Loading branch information
kitsudaiki committed Jul 28, 2024
1 parent b40e857 commit 35f3930
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ name: build-and-test

on: [push]

permissions:
contents: read
pull-requests: read

env:
REGISTRY_IMAGE: kitsudaiki/hanami
REGISTRY_DOCS_IMAGE: kitsudaiki/hanami_docs

jobs:

clang-format-check:
name: "Check clang-format"
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
Expand All @@ -24,6 +29,7 @@ jobs:


cpp-check:
name: "Run cpp-check"
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
Expand All @@ -39,6 +45,7 @@ jobs:


ansible-lint:
name: "Lint ansible playbook"
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
Expand All @@ -54,6 +61,7 @@ jobs:


flake8-check:
name: "flake8 check"
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
Expand All @@ -69,10 +77,12 @@ jobs:


check-for-executables:
name: "Search binary executables"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
-
name: checkout code
uses: actions/checkout@v4
-
name: Run binary files check script
run: |
Expand All @@ -86,10 +96,21 @@ jobs:
exit 0
commit-lint:
name: "Lint commits"
runs-on: ubuntu-latest
steps:
-
name: checkout code
uses: actions/checkout@v4
-
name: lint commits
uses: wagoid/commitlint-github-action@v6


build_python_package:
name: "Build SDK python-package"
needs: [ cpp-check, clang-format-check, ansible-lint, flake8-check, check-for-executables ]
needs: [ cpp-check, clang-format-check, ansible-lint, flake8-check, check-for-executables, commit-lint ]
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
Expand Down Expand Up @@ -142,7 +163,7 @@ jobs:

build_helm_package:
name: "Build Helm package"
needs: [ cpp-check, clang-format-check, ansible-lint, flake8-check, check-for-executables ]
needs: [ cpp-check, clang-format-check, ansible-lint, flake8-check, check-for-executables, commit-lint ]
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
Expand Down Expand Up @@ -186,7 +207,7 @@ jobs:

build_hanami:
name: "Compile Hanami"
needs: [ cpp-check, clang-format-check, ansible-lint, flake8-check, check-for-executables ]
needs: [ cpp-check, clang-format-check, ansible-lint, flake8-check, check-for-executables, commit-lint ]
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
Expand Down Expand Up @@ -227,7 +248,7 @@ jobs:

build_hanamictl:
name: "Compile CLI"
needs: [ cpp-check, clang-format-check, ansible-lint, flake8-check, check-for-executables ]
needs: [ cpp-check, clang-format-check, ansible-lint, flake8-check, check-for-executables, commit-lint ]
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
Expand Down Expand Up @@ -267,7 +288,7 @@ jobs:

compiler_test:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
needs: [ cpp-check, clang-format-check, ansible-lint, flake8-check, check-for-executables ]
needs: [ cpp-check, clang-format-check, ansible-lint, flake8-check, check-for-executables, commit-lint ]
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit 35f3930

Please sign in to comment.