From 15382e9bf252cf90ffe6013a9ab3922ff1f5e73b Mon Sep 17 00:00:00 2001 From: Peter Shen Date: Tue, 27 Feb 2024 09:54:44 +0800 Subject: [PATCH 1/3] Support codeql analysis --- .github/workflows/codeql.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..0323799 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,14 @@ +name: CodeQL + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + codeql: + uses: cpp-linter/.github/.github/workflows/codeql.yml@add-codeql-workflow + with: + language: python From 4a93d7f2ec50207127cf10450ab6ad830b096b2f Mon Sep 17 00:00:00 2001 From: Peter Shen Date: Tue, 27 Feb 2024 16:48:37 +0800 Subject: [PATCH 2/3] Update test.yml --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5e0b863..6dc4878 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,7 @@ jobs: with: commands: pip install pytest -e . test: + needs: [pre-commit] runs-on: ubuntu-latest steps: - name: Checkout From c59842ef1f8f091a75591f99166d6c401507279b Mon Sep 17 00:00:00 2001 From: Peter Shen Date: Tue, 27 Feb 2024 16:49:59 +0800 Subject: [PATCH 3/3] Update test.yml --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6dc4878..7dfa010 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,12 +8,7 @@ on: workflow_dispatch: jobs: - pre-commit: - uses: cpp-linter/.github/.github/workflows/pre-commit.yml@main - with: - commands: pip install pytest -e . test: - needs: [pre-commit] runs-on: ubuntu-latest steps: - name: Checkout @@ -41,3 +36,8 @@ jobs: verbose: true # optional (default = false) - name: Test cpp-linter-hooks run: sh testing/run.sh + pre-commit: + needs: [test] + uses: cpp-linter/.github/.github/workflows/pre-commit.yml@main + with: + commands: pip install pytest -e .