From 2409fddf30b5e56823305167fcbe2e111fe8c891 Mon Sep 17 00:00:00 2001 From: Victor Yves Crispim Date: Fri, 24 Nov 2023 17:15:33 -0300 Subject: [PATCH] ci: merge workflows Since the `commits`, `license-header`, and `go-code-quality` workflows are very simple and share a similar trigger, it made sense to merge them all in a single workflow. --- .github/workflows/code-quality.yml | 34 +++++++++++++++++++++++++++ .github/workflows/commits.yml | 19 --------------- .github/workflows/go-code-quality.yml | 27 --------------------- .github/workflows/license-header.yml | 24 ------------------- 4 files changed, 34 insertions(+), 70 deletions(-) create mode 100644 .github/workflows/code-quality.yml delete mode 100644 .github/workflows/commits.yml delete mode 100644 .github/workflows/go-code-quality.yml delete mode 100644 .github/workflows/license-header.yml diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml new file mode 100644 index 000000000..f0853cad0 --- /dev/null +++ b/.github/workflows/code-quality.yml @@ -0,0 +1,34 @@ +name: Assess code quality + +on: push + +jobs: + assess-code-quality: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + + - name: Check conventional commit + uses: cocogitto/cocogitto-action@v3 + id: conventional_commit_check + with: + check-latest-tag-only: true + + - name: Check license header + uses: viperproject/check-license-header@v2 + with: + path: ./ + config: .github/license-check/config.json + + - uses: actions/setup-go@v4 + with: + go-version-file: "go.mod" + + - name: Run Go Linter + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54.2 diff --git a/.github/workflows/commits.yml b/.github/workflows/commits.yml deleted file mode 100644 index d4fff7b78..000000000 --- a/.github/workflows/commits.yml +++ /dev/null @@ -1,19 +0,0 @@ -# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json -name: Conventional commit check - -on: [push] - -jobs: - commit_messages: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Conventional commit check - id: conventional_commit_check - uses: cocogitto/cocogitto-action@v3 - with: - check-latest-tag-only: true diff --git a/.github/workflows/go-code-quality.yml b/.github/workflows/go-code-quality.yml deleted file mode 100644 index 7f70cc470..000000000 --- a/.github/workflows/go-code-quality.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Assess Go code quality - -on: - push: - paths: - - ".github/workflows/go-code-quality.yml" - - ".golangci.yml" - - "cmd/**" - - "internal/**" - -jobs: - assess-go-code-quality: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - uses: actions/setup-go@v4 - with: - go-version-file: "go.mod" - - - name: Run Linter - uses: golangci/golangci-lint-action@v3 - with: - version: v1.54.2 diff --git a/.github/workflows/license-header.yml b/.github/workflows/license-header.yml deleted file mode 100644 index 5dbafafec..000000000 --- a/.github/workflows/license-header.yml +++ /dev/null @@ -1,24 +0,0 @@ -# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json -name: Check license header - -on: - push: - paths: - - ".github/workflows/license-header.yml" - - ".github/license-check" - - "cmd/**" - - "internal/**" - - "offchain/**" -jobs: - check-copyright: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - uses: viperproject/check-license-header@v2 - with: - path: ./ - config: .github/license-check/config.json