-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from JamesJJ/yaml-check
GHA:yamllint (Standard YAML formatting)
- Loading branch information
Showing
4 changed files
with
71 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,35 @@ | ||
--- | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
pull_request: | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
|
||
- name: Format Check | ||
run: cd function && if [ $(gofmt -l -s . | grep -E -v '^vendor/' | tee /tmp/gofmt.txt | wc -l) -ne 0 ]; then echo "fmt failed:"; cat /tmp/gofmt.txt ; exit 1; fi | ||
- name: Format Check | ||
run: cd function && if [ $(gofmt -l -s . | grep -E -v '^vendor/' | tee /tmp/gofmt.txt | ||
| wc -l) -ne 0 ]; then echo "fmt failed:"; cat /tmp/gofmt.txt ; exit 1; | ||
fi | ||
|
||
- name: Build | ||
run: cd function && go build -v ./... | ||
- name: Build | ||
run: cd function && go build -v ./... | ||
|
||
- name: Test | ||
run: cd function && go test -v -covermode="count" -coverprofile="/tmp/coverage.out" | ||
- name: Coverage Report | ||
run: cd function && go tool cover -func="/tmp/coverage.out" | ||
- name: Test | ||
run: cd function && go test -v -covermode="count" -coverprofile="/tmp/coverage.out" | ||
|
||
- name: Coverage Report | ||
run: cd function && go tool cover -func="/tmp/coverage.out" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
name: YAML | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
|
||
job1: | ||
name: yamllint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: yamllint | ||
uses: ibiqlik/action-yamllint@v3 | ||
with: | ||
config_data: | | ||
extends: default | ||
rules: | ||
comments: | ||
require-starting-space: false | ||
comments-indentation: disable | ||
truthy: | ||
check-keys: false | ||
line-length: disable | ||
document-start: disable | ||
document-end: disable | ||
empty-lines: | ||
max: 2 | ||
max-end: 2 | ||
brackets: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters