script: yaml formatting (#261)
This commit is contained in:
committed by
GitHub
parent
f1f7d93959
commit
96c4d85995
114
.github/workflows/ci.yml
vendored
114
.github/workflows/ci.yml
vendored
@@ -1,8 +1,6 @@
|
|||||||
name: ci
|
name: ci
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -10,7 +8,6 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '17 12 * * 6'
|
- cron: '17 12 * * 6'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -19,44 +16,41 @@ jobs:
|
|||||||
platform: [ubuntu-latest]
|
platform: [ubuntu-latest]
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v3.0.0
|
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v3.0.0
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Configure Go Environment
|
- name: Configure Go Environment
|
||||||
run: |
|
run: |
|
||||||
echo GOPATH=${{ runner.workspace }} >> $GITHUB_ENV
|
echo GOPATH=${{ runner.workspace }} >> $GITHUB_ENV
|
||||||
echo ${{ runner.workspace }}/bin >> $GITHUB_PATH
|
echo ${{ runner.workspace }}/bin >> $GITHUB_PATH
|
||||||
- name: Go Environment
|
- name: Go Environment
|
||||||
run: go env
|
run: go env
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Bootstrap
|
- name: Bootstrap
|
||||||
run: ./script/bootstrap
|
run: ./script/bootstrap
|
||||||
|
- name: Build
|
||||||
- name: Build
|
run: go build ./...
|
||||||
run: go build ./...
|
- name: Test
|
||||||
- name: Test
|
run: go test -bench . ./...
|
||||||
run: go test -bench . ./...
|
- name: Coverage
|
||||||
- name: Coverage
|
run: ./script/coverage
|
||||||
run: ./script/coverage
|
- name: Upload Unit Test Coverage
|
||||||
|
uses: codecov/codecov-action@51d810878be5422784e86451c0e7c14e5860ec47 # v2.0.2
|
||||||
- name: Upload Unit Test Coverage
|
with:
|
||||||
uses: codecov/codecov-action@51d810878be5422784e86451c0e7c14e5860ec47 # v2.0.2
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
with:
|
files: unittests.coverprofile
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
flags: unittests
|
||||||
files: unittests.coverprofile
|
- name: Upload Integration Test Coverage
|
||||||
flags: unittests
|
uses: codecov/codecov-action@51d810878be5422784e86451c0e7c14e5860ec47 # v2.0.2
|
||||||
- name: Upload Integration Test Coverage
|
with:
|
||||||
uses: codecov/codecov-action@51d810878be5422784e86451c0e7c14e5860ec47 # v2.0.2
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
with:
|
files: integration.coverprofile
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
flags: integration
|
||||||
files: integration.coverprofile
|
|
||||||
flags: integration
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -64,22 +58,22 @@ jobs:
|
|||||||
platform: [ubuntu-latest]
|
platform: [ubuntu-latest]
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v3.0.0
|
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v3.0.0
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Configure Go Environment
|
- name: Configure Go Environment
|
||||||
run: |
|
run: |
|
||||||
echo GOPATH=${{ runner.workspace }} >> $GITHUB_ENV
|
echo GOPATH=${{ runner.workspace }} >> $GITHUB_ENV
|
||||||
echo ${{ runner.workspace }}/bin >> $GITHUB_PATH
|
echo ${{ runner.workspace }}/bin >> $GITHUB_PATH
|
||||||
- name: Go Environment
|
- name: Go Environment
|
||||||
run: go env
|
run: go env
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Bootstrap
|
- name: Bootstrap
|
||||||
run: ./script/bootstrap
|
run: ./script/bootstrap
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: ./script/lint
|
run: ./script/lint
|
||||||
|
|||||||
1
.github/workflows/packages.yml
vendored
1
.github/workflows/packages.yml
vendored
@@ -8,7 +8,6 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
zeebo-xxh3:
|
zeebo-xxh3:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
74
.github/workflows/stress.yml
vendored
74
.github/workflows/stress.yml
vendored
@@ -1,51 +1,45 @@
|
|||||||
name: stress
|
name: stress
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '33 3 * * 6'
|
- cron: '33 3 * * 6'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
GOFLAGS: -tags=stress
|
GOFLAGS: -tags=stress
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v3.0.0
|
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v3.0.0
|
||||||
with:
|
with:
|
||||||
go-version: 1.18.x
|
go-version: 1.18.x
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Configure Go Environment
|
- name: Configure Go Environment
|
||||||
run: |
|
run: |
|
||||||
echo GOPATH=${{ runner.workspace }} >> $GITHUB_ENV
|
echo GOPATH=${{ runner.workspace }} >> $GITHUB_ENV
|
||||||
echo ${{ runner.workspace }}/bin >> $GITHUB_PATH
|
echo ${{ runner.workspace }}/bin >> $GITHUB_PATH
|
||||||
- name: Go Environment
|
- name: Go Environment
|
||||||
run: go env
|
run: go env
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Bootstrap
|
- name: Bootstrap
|
||||||
run: ./script/bootstrap
|
run: ./script/bootstrap
|
||||||
|
- name: Generate
|
||||||
- name: Generate
|
run: ./script/generate
|
||||||
run: ./script/generate
|
- name: Status
|
||||||
- name: Status
|
run: git status
|
||||||
run: git status
|
- name: Build
|
||||||
|
run: go build ./...
|
||||||
- name: Build
|
- name: Test
|
||||||
run: go build ./...
|
run: go test -bench . ./...
|
||||||
- name: Test
|
- name: Coverage
|
||||||
run: go test -bench . ./...
|
run: ./script/coverage
|
||||||
- name: Coverage
|
- name: Upload Stress Unit Test Coverage
|
||||||
run: ./script/coverage
|
uses: codecov/codecov-action@51d810878be5422784e86451c0e7c14e5860ec47 # v2.0.2
|
||||||
|
with:
|
||||||
- name: Upload Stress Unit Test Coverage
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
uses: codecov/codecov-action@51d810878be5422784e86451c0e7c14e5860ec47 # v2.0.2
|
files: unittests.coverprofile
|
||||||
with:
|
flags: stress
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
files: unittests.coverprofile
|
|
||||||
flags: stress
|
|
||||||
|
|||||||
3
.github/workflows/thirdparty.yml
vendored
3
.github/workflows/thirdparty.yml
vendored
@@ -1,8 +1,6 @@
|
|||||||
name: thirdparty
|
name: thirdparty
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -12,7 +10,6 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "tests/thirdparty/**"
|
- "tests/thirdparty/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
run:
|
run:
|
||||||
timeout: 5m
|
timeout: 5m
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
enable-all: true
|
enable-all: true
|
||||||
disable:
|
disable:
|
||||||
@@ -32,7 +31,6 @@ linters:
|
|||||||
- varnamelen
|
- varnamelen
|
||||||
- wrapcheck
|
- wrapcheck
|
||||||
- wsl
|
- wsl
|
||||||
|
|
||||||
linters-settings:
|
linters-settings:
|
||||||
depguard:
|
depguard:
|
||||||
list-type: whitelist
|
list-type: whitelist
|
||||||
@@ -44,7 +42,6 @@ linters-settings:
|
|||||||
- standard
|
- standard
|
||||||
- default
|
- default
|
||||||
- prefix(github.com/mmcloughlin/avo)
|
- prefix(github.com/mmcloughlin/avo)
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
exclude-use-default: false
|
exclude-use-default: false
|
||||||
exclude:
|
exclude:
|
||||||
|
|||||||
@@ -20,3 +20,6 @@ go install golang.org/x/tools/cmd/goimports@v0.1.10
|
|||||||
|
|
||||||
# gofumpt for stricter formatting.
|
# gofumpt for stricter formatting.
|
||||||
go install mvdan.cc/gofumpt@v0.2.1
|
go install mvdan.cc/gofumpt@v0.2.1
|
||||||
|
|
||||||
|
# yamlfmt for yaml formatting.
|
||||||
|
go install github.com/gechr/yamlfmt@v0.0.0-20220216093356-e9288cd48d12
|
||||||
|
|||||||
@@ -16,3 +16,6 @@ goimports -w -local "${repo}" ${files}
|
|||||||
|
|
||||||
# gofumpt for stricter gofmt-compatible format.
|
# gofumpt for stricter gofmt-compatible format.
|
||||||
gofumpt -w ${files}
|
gofumpt -w ${files}
|
||||||
|
|
||||||
|
# yaml formatting.
|
||||||
|
find . -name '*.yml' | xargs yamlfmt -w
|
||||||
|
|||||||
1
tests/thirdparty/make_workflow.go
vendored
1
tests/thirdparty/make_workflow.go
vendored
@@ -85,7 +85,6 @@ func GenerateWorkflow(pkgs thirdparty.Packages) ([]byte, error) {
|
|||||||
g.Linef(" pull_request:")
|
g.Linef(" pull_request:")
|
||||||
|
|
||||||
// One job per package.
|
// One job per package.
|
||||||
g.NL()
|
|
||||||
g.Linef("jobs:")
|
g.Linef("jobs:")
|
||||||
g.Indent()
|
g.Indent()
|
||||||
for _, pkg := range pkgs {
|
for _, pkg := range pkgs {
|
||||||
|
|||||||
Reference in New Issue
Block a user