From 703104e4e0ea9b66de41f8d55c9d6530aa4f3f2d Mon Sep 17 00:00:00 2001 From: Paulo Vital Date: Tue, 18 Mar 2025 14:06:18 +0100 Subject: [PATCH] ci: Add Ruff linter as GitHub Action. Executes Ruff as linter tool to check code pattern. Signed-off-by: Paulo Vital --- .github/workflows/linter.yml | 13 +++++++++++++ .github/workflows/release-notification-on-slack.yml | 2 +- .github/workflows/sonarqube.yml | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 00000000..3b0a43de --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,13 @@ +name: Ruff +on: [ push, pull_request ] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/ruff-action@v3 + with: + src: >- + ./src + ./tests + ./tests-aws \ No newline at end of file diff --git a/.github/workflows/release-notification-on-slack.yml b/.github/workflows/release-notification-on-slack.yml index 186466e1..792cdcd2 100644 --- a/.github/workflows/release-notification-on-slack.yml +++ b/.github/workflows/release-notification-on-slack.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Checkout the needed file only ./bin/announce_release_on_slack.py' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - run: | if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then export GITHUB_RELEASE_TAG=${{ inputs.github_ref }} diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index e18495fe..a2fcd56d 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -10,7 +10,7 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: sonarsource/sonarqube-scan-action@master