From f5c6ff84a5e7255acdf0903861f6edccf2424272 Mon Sep 17 00:00:00 2001 From: Evgeniy Frolov Date: Tue, 22 Jul 2025 12:46:33 +0300 Subject: [PATCH 1/4] chore(ci): update lint workflow Signed-off-by: Evgeniy Frolov --- .github/workflows/lint.yml | 82 +++++++++----------------------------- 1 file changed, 19 insertions(+), 63 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f3a7616..0714f06 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,74 +3,30 @@ name: Lint on: workflow_call: inputs: - force-skip: - default: "false" - type: string - taskfile-dir: - description: "directory where taskfile is located" - type: string - default: ${{ github.workspace }} - go-version-file-dir: - description: "directory where go.mod is located. Can be multiple dirs" - type: string - default: '["."]' - packages: - description: "packages to install" + path-to-go-mod: type: string - -env: - DEBIAN_FRONTEND: "noninteractive" + required: true + default: "go.mod" jobs: - prettier: - runs-on: ubuntu-latest - timeout-minutes: 7 - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Task - uses: arduino/setup-task@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install prettier - run: task -p deps:install:prettier - - - name: Lint - run: task -p lint:prettier - - golangci-lint: - timeout-minutes: 7 - runs-on: ubuntu-latest - strategy: - matrix: - directory: ${{ fromJson(inputs.go-version-file-dir) }} + lint: + runs-on: ubuntu-22.04 steps: - - name: Install build dependencies - if: inputs.packages && inputs.packages != '' - run: | - sudo apt-get update - sudo apt-get install -y ${{ inputs.packages }} - - - name: Checkout code - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: ${{ matrix.directory }}/go.mod + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: ${{ inputs.path-to-go-mod }} - - name: Install Task - uses: arduino/setup-task@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Task + uses: arduino/setup-task@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install golangci-lint - run: task -p deps:install:golangci-lint + - name: Install golangci-lint + run: task -p deps:install:golangci-lint - - name: Lint - working-directory: ${{ matrix.directory }} - run: task -p lint:golangci-lint - env: - GITHUB_WORKSPACE: ${{ github.workspace }} + - name: Lint + run: task -p lint \ No newline at end of file From 97fd2ec12fb00c06c57680145338bfc5da70ec6a Mon Sep 17 00:00:00 2001 From: Evgeniy Frolov Date: Tue, 22 Jul 2025 12:51:25 +0300 Subject: [PATCH 2/4] chore(ci): remove required property Signed-off-by: Evgeniy Frolov --- .github/workflows/lint.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0714f06..2bc0a3c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,6 @@ on: inputs: path-to-go-mod: type: string - required: true default: "go.mod" jobs: From a3e3846b16857f016800750014cb935362a2ce4c Mon Sep 17 00:00:00 2001 From: Evgeniy Frolov Date: Tue, 22 Jul 2025 13:26:18 +0300 Subject: [PATCH 3/4] chore(ci): add flag to install btrfs deps Signed-off-by: Evgeniy Frolov --- .github/workflows/lint.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2bc0a3c..5d7a2fa 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,11 +6,18 @@ on: path-to-go-mod: type: string default: "go.mod" + skipBtrfs: + type: string + default: "true" jobs: lint: runs-on: ubuntu-22.04 steps: + - name: Install Btrfs + if: inputs.skipBtrfs == 'false' + run: sudo apt-get install -y libbtrfs-dev + - name: Checkout code uses: actions/checkout@v4 From b979766fae3ad2fcb8824153e9cd22c87633200f Mon Sep 17 00:00:00 2001 From: Evgeniy Frolov Date: Tue, 22 Jul 2025 13:54:32 +0300 Subject: [PATCH 4/4] chore(ci): rename job Signed-off-by: Evgeniy Frolov --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5d7a2fa..f33ee0f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,7 +11,7 @@ on: default: "true" jobs: - lint: + _: runs-on: ubuntu-22.04 steps: - name: Install Btrfs