From f546a8649d44794531b21e6da9a2eb302f7f7f7a Mon Sep 17 00:00:00 2001 From: themilchenko Date: Fri, 1 Nov 2024 16:44:25 +0300 Subject: [PATCH] ci: add luacheck linter There was a linter check in test in `testing` workflow, but not in a separate job. After the patch a linter check is available in a separate job and the previous step from `testing` workflow was deleted. Closes #21 --- .github/workflows/check.yaml | 36 ++++++++++++++++++++++++++++++++++ .github/workflows/testing.yaml | 4 +--- 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/check.yaml diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..4020584 --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,36 @@ +name: Run static analysis + +on: + push: + pull_request: + +jobs: + run-static-analysis: + if: | + github.event_name == 'push' || + github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name != github.repository + + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@master + + - name: Setup Tarantool CE + uses: tarantool/setup-tarantool@v3 + with: + tarantool-version: '3.2.0' + + - name: Setup tt + run: | + curl -L https://tarantool.io/release/3/installer.sh | sudo bash + sudo apt install -y tt + tt version + + - name: Setup luacheck + run: make deps-lint + + - run: echo $PWD/.rocks/bin >> $GITHUB_PATH + + - name: Run luacheck + run: make check diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 571275b..fbcd465 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -95,13 +95,11 @@ jobs: tt version - name: Install requirements - run: make deps + run: make deps-coverage if: steps.cache-rocks.outputs.cache-hit != 'true' - run: echo $PWD/.rocks/bin >> $GITHUB_PATH - - run: make check - - run: make test - name: Send code coverage to 'coveralls.io'