Skip to content

Commit

Permalink
split workflow.yml (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatousJobanek authored Mar 22, 2024
1 parent 0ec54dd commit 2b38309
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 36 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: ci-build
on:

Check warning on line 2 in .github/workflows/linters.yml

View workflow job for this annotation

GitHub Actions / YAML Lint

2:1 [truthy] truthy value should be one of [false, true]
push:
branches:
- master
tags-ignore:
- '*.*'
pull_request:
branches:
- master

jobs:
golangci:
name: GolangCI Lint
runs-on: ubuntu-latest

steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x

- name: Checkout code
uses: actions/checkout@v4

- name: Lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.56.2
skip-pkg-cache: true
skip-build-cache: true
args: --config=./.golangci.yml --verbose

yammlint:
name: YAML Lint
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install yamllint
run: pip install yamllint

- name: Lint YAML files
run: yamllint -c .yamllint ./
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]

Check warning on line 18 in .github/workflows/test-with-coverage.yml

View workflow job for this annotation

GitHub Actions / YAML Lint

18:14 [brackets] too many spaces inside brackets

Check warning on line 18 in .github/workflows/test-with-coverage.yml

View workflow job for this annotation

GitHub Actions / YAML Lint

18:28 [brackets] too many spaces inside brackets
name: Test-with-Coverage
name: Test with coverage

steps:
- name: Install Go
Expand All @@ -26,6 +26,10 @@ jobs:

- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0

- name: Cache dependencies
uses: actions/cache@v4
Expand All @@ -50,38 +54,3 @@ jobs:
flags: unittests # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)

golangci:
name: GolangCI Lint
runs-on: ubuntu-latest

steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x

- name: Checkout code
uses: actions/checkout@v4

- name: Lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.56.2
skip-pkg-cache: true
skip-build-cache: true
args: --config=./.golangci.yml --verbose

yammlint:
name: YAML Lint
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install yamllint
run: pip install yamllint

- name: Lint YAML files
run: yamllint -c .yamllint ./

0 comments on commit 2b38309

Please sign in to comment.