From 64c3cf6b4df46b74aac3a3080aa72b2dc8d9e88f Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Tue, 30 Jan 2024 11:20:44 -0500 Subject: [PATCH] Add static check with "avocado-static-checks" Adds a Python module import order check. This is based on "avocado-static-checks", which is being added here as a submodule. The idea is to use the same checks in all "avocado-framework" projects without having to maintain different versions of the static check code/wrappers. Signed-off-by: Cleber Rosa --- .github/workflows/modules-tests.yml | 14 ++++++++++++++ .gitmodules | 4 ++++ static-checks | 1 + 3 files changed, 19 insertions(+) create mode 100644 .gitmodules create mode 160000 static-checks diff --git a/.github/workflows/modules-tests.yml b/.github/workflows/modules-tests.yml index ff00315..de512d4 100644 --- a/.github/workflows/modules-tests.yml +++ b/.github/workflows/modules-tests.yml @@ -16,3 +16,17 @@ jobs: - name: Run the ar module test run: ./tests/test-module.py metadata/autils/archive/ar.yml + + static-checks: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + with: + submodules: true + + - name: Install requirements for the static checks + run: pip3 install -r static-checks/requirements.txt + + - name: Runs all the static checks + run: ./static-checks/run-static-checks diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1ceb9f9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "avocado-static-checks"] + path = static-checks + url = ../avocado-static-checks + branch = main diff --git a/static-checks b/static-checks new file mode 160000 index 0000000..9aab466 --- /dev/null +++ b/static-checks @@ -0,0 +1 @@ +Subproject commit 9aab466f3c3037f1003a890d6c35100c68789fc5