Skip to content

Commit

Permalink
chore: yaml lint (#18)
Browse files Browse the repository at this point in the history
* chore: yaml lint

* yamllint make check + ignore files

---------

Co-authored-by: Andrew Benington <[email protected]>
  • Loading branch information
AlaricWhitney and andrewbenington authored Aug 16, 2023
1 parent fe4a67b commit eef1a50
Show file tree
Hide file tree
Showing 10 changed files with 272 additions and 245 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# name of the action
name: build

Expand All @@ -10,19 +11,19 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: clone
uses: actions/checkout@v3
- name: install go
uses: actions/setup-go@v4
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true
check-latest: true
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v4
with:
# use version from go.mod file
go-version-file: "go.mod"
cache: true
check-latest: true

- name: build
run: |
make build
- name: build
run: |
make build
25 changes: 13 additions & 12 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
---
# name of the action
name: labeler

# trigger when pull request is opened or when a draft is marked ready to review
on:
pull_request:
types: ['opened', 'ready_for_review', 'reopened', 'synchronize']
types: ["opened", "ready_for_review", "reopened", "synchronize"]

# pipeline to execute
jobs:
labeler:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false

steps:
- name: labeler
uses: codelytv/pr-size-labeler@d269449310fe33526c56b2dfe6244e3a9f489b15
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
xs_label: 'size/xs'
xs_max_size: '15'
s_label: 'size/s'
s_max_size: '100'
m_label: 'size/m'
m_max_size: '250'
l_label: 'size/l'
l_max_size: '500'
xl_label: 'size/xl'
fail_if_xl: 'false'
xs_label: "size/xs"
xs_max_size: "15"
s_label: "size/s"
s_max_size: "100"
m_label: "size/m"
m_max_size: "250"
l_label: "size/l"
l_max_size: "500"
xl_label: "size/xl"
fail_if_xl: "false"
message_if_xl: >
This PR exceeds the recommended size of 500 lines.
Please make sure you are NOT addressing multiple issues with one PR.
Expand Down
65 changes: 33 additions & 32 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,50 @@
---
# name of the action
name: prerelease

# trigger on push events with `v*` in tag
on:
push:
tags:
- 'v*'
- "v*"

# pipeline to execute
jobs:
prerelease:
runs-on: ubuntu-latest

steps:
- name: clone
uses: actions/checkout@v3
with:
# ensures we fetch tag history for the repository
fetch-depth: 0
- name: clone
uses: actions/checkout@v3
with:
# ensures we fetch tag history for the repository
fetch-depth: 0

- name: install go
uses: actions/setup-go@v4
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true
check-latest: true
- name: install go
uses: actions/setup-go@v4
with:
# use version from go.mod file
go-version-file: "go.mod"
cache: true
check-latest: true

- name: setup
run: |
# setup git tag in Actions environment
echo "GITHUB_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: setup
run: |
# setup git tag in Actions environment
echo "GITHUB_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: build
env:
GOOS: linux
CGO_ENABLED: '0'
run: |
make build-static-ci
- name: build
env:
GOOS: linux
CGO_ENABLED: "0"
run: |
make build-static-ci
- name: publish
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: target/vela-k6
cache: true
tag_names: true
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: publish
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: target/vela-k6
cache: true
tag_names: true
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
55 changes: 28 additions & 27 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
---
# name of the action
name: publish

# trigger on push events with branch main
on:
push:
branches: [ main ]
branches: [main]

# pipeline to execute
jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: clone
uses: actions/checkout@v3
with:
# ensures we fetch tag history for the repository
fetch-depth: 0
- name: clone
uses: actions/checkout@v3
with:
# ensures we fetch tag history for the repository
fetch-depth: 0

- name: install go
uses: actions/setup-go@v4
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true
check-latest: true
- name: install go
uses: actions/setup-go@v4
with:
# use version from go.mod file
go-version-file: "go.mod"
cache: true
check-latest: true

- name: build
env:
GOOS: linux
CGO_ENABLED: '0'
run: |
make build-static-ci
- name: build
env:
GOOS: linux
CGO_ENABLED: "0"
run: |
make build-static-ci
- name: publish
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: target/vela-k6
cache: true
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: publish
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: target/vela-k6
cache: true
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
75 changes: 38 additions & 37 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# name of the action
name: reviewdog

Expand All @@ -11,45 +12,45 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v4
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true
check-latest: true

- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ secrets.github_token }}
golangci_lint_flags: "--config=.golangci.yml"
fail_on_error: true
filter_mode: diff_context
reporter: github-pr-review
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v4
with:
# use version from go.mod file
go-version-file: "go.mod"
cache: true
check-latest: true

- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ secrets.github_token }}
golangci_lint_flags: "--config=.golangci.yml"
fail_on_error: true
filter_mode: diff_context
reporter: github-pr-review

full-review:
runs-on: ubuntu-latest

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v4
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true
check-latest: true

- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ secrets.github_token }}
golangci_lint_flags: "--config=.golangci.yml"
fail_on_error: false
filter_mode: nofilter
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v4
with:
# use version from go.mod file
go-version-file: "go.mod"
cache: true
check-latest: true

- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ secrets.github_token }}
golangci_lint_flags: "--config=.golangci.yml"
fail_on_error: false
filter_mode: nofilter
35 changes: 18 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# name of the action
name: test

Expand All @@ -12,23 +13,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: clone
uses: actions/checkout@v3
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v4
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true
check-latest: true
- name: install go
uses: actions/setup-go@v4
with:
# use version from go.mod file
go-version-file: "go.mod"
cache: true
check-latest: true

- name: test
run: |
go test -race -covermode=atomic -coverprofile=coverage.out ./...
- name: test
run: |
go test -race -covermode=atomic -coverprofile=coverage.out ./...
- name: coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.out
- name: coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.out
Loading

0 comments on commit eef1a50

Please sign in to comment.