Skip to content

Commit

Permalink
Adding linting steps to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusgomes28 committed Feb 17, 2024
1 parent 0188d1c commit 8c01506
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/actions/golangci-lint/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Golang CI 1
description: golangci-lint step
inputs:
linter:
description: Linter to run
required: true
runs:
using: composite
steps:
- name: Golang CI 2
run: golangci-lint run --disable-all -E ${{ inputs.linter }}
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

runs-on: ubuntu-latest
container:
image: mattgomes28/urchin-golang:0.1
image: mattgomes28/urchin-golang:0.2
options: --user 1001

steps:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/failfast.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Fail Fast

on: [workflow_call]

env:
CARGO_TERM_COLOR: always

jobs:
format-check:
runs-on: ubuntu-latest
container:
image: mattgomes28/urchin-golang:0.2
options: --user 1001

steps:
- uses: actions/checkout@v3

- uses: ./.github/workflows/actions/golang-lint
with:
linter: errcheck
7 changes: 4 additions & 3 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ on:
branches: [ "main" ]

jobs:
# failfast:
# uses: ./.github/workflows/failfast.yml
failfast:
uses: ./.github/workflows/failfast.yml

build:
uses: ./.github/workflows/build.yml
# needs: failfast
needs: failfast
# tests:
# uses: ./.github/workflows/test.yml
# needs: build
Expand Down

0 comments on commit 8c01506

Please sign in to comment.