Update CI configs to v0.5.9

Update lint scripts and CI configs.
This commit is contained in:
Pion
2021-07-21 00:27:10 +00:00
committed by Atsushi Watanabe
parent 3af80189da
commit f445f21ac1
4 changed files with 73 additions and 24 deletions

View File

@@ -1,3 +1,14 @@
#
# DO NOT EDIT THIS FILE
#
# It is automatically copied from https://github.com/pion/.goassets repository.
# If this repository should have package specific CI config,
# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
#
# If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository.
#
name: generate-authors
on:
@@ -52,11 +63,11 @@ jobs:
run: |
echo "::set-output name=msg::$(git status -s | wc -l)"
- uses: stefanzweifel/git-auto-commit-action@v4
- name: Commit and push
if: ${{ steps.git-status-output.outputs.msg != '0' }}
with:
commit_message: ${{ steps.last-commit-message.outputs.msg }}
commit_author: ${{ steps.last-commit-author.outputs.msg }}
commit_options: '--amend --no-edit'
push_options: '--force'
skip_fetch: true
run: |
git config user.email $(echo "${{ steps.last-commit-author.outputs.msg }}" | sed 's/\(.\+\) <\(\S\+\)>/\2/')
git config user.name $(echo "${{ steps.last-commit-author.outputs.msg }}" | sed 's/\(.\+\) <\(\S\+\)>/\1/')
git add AUTHORS.txt
git commit --amend --no-edit
git push --force https://github.com/${GITHUB_REPOSITORY} $(git symbolic-ref -q --short HEAD)

View File

@@ -1,3 +1,14 @@
#
# DO NOT EDIT THIS FILE
#
# It is automatically copied from https://github.com/pion/.goassets repository.
# If this repository should have package specific CI config,
# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
#
# If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository.
#
name: Lint
on:
pull_request:

View File

@@ -1,3 +1,14 @@
#
# DO NOT EDIT THIS FILE
#
# It is automatically copied from https://github.com/pion/.goassets repository.
# If this repository should have package specific CI config,
# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
#
# If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository.
#
name: Test
on:
push:
@@ -39,9 +50,17 @@ jobs:
- name: Run test
run: |
TEST_BENCH_OPTION="-bench=."
if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
go-acc -o cover.out ./... -- \
-bench=. \
-v -race
${TEST_BENCH_OPTION} \
-v -race
- name: Run TEST_HOOK
run: |
if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
if [ -n "${TEST_HOOK}" ]; then ${TEST_HOOK}; fi
- uses: codecov/codecov-action@v1
with:
@@ -73,17 +92,17 @@ jobs:
run: |
mkdir -p $HOME/go/pkg/mod $HOME/.cache
docker run \
-u $(id -u):$(id -g) \
-e "GO111MODULE=on" \
-e "CGO_ENABLED=0" \
-v $GITHUB_WORKSPACE:/go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
-v $HOME/go/pkg/mod:/go/pkg/mod \
-v $HOME/.cache:/.cache \
-w /go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
i386/golang:${{matrix.go}}-alpine \
/usr/local/go/bin/go test \
${TEST_EXTRA_ARGS:-} \
-v ./...
-u $(id -u):$(id -g) \
-e "GO111MODULE=on" \
-e "CGO_ENABLED=0" \
-v $GITHUB_WORKSPACE:/go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
-v $HOME/go/pkg/mod:/go/pkg/mod \
-v $HOME/.cache:/.cache \
-w /go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
i386/golang:${{matrix.go}}-alpine \
/usr/local/go/bin/go test \
${TEST_EXTRA_ARGS:-} \
-v ./...
test-wasm:
runs-on: ubuntu-latest
@@ -119,17 +138,18 @@ jobs:
run: echo "GOPATH=${HOME}/go" >> $GITHUB_ENV
- name: Set Go Path
run: echo "GO_JS_WASM_EXEC=${PWD}/test-wasm/go_js_wasm_exec" >> $GITHUB_ENV
run: echo "GO_JS_WASM_EXEC=${GOROOT}/misc/wasm/go_js_wasm_exec" >> $GITHUB_ENV
- name: Insall NPM modules
run: yarn install
- name: Run Tests
run: |
if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
GOOS=js GOARCH=wasm $GOPATH/bin/go test \
-coverprofile=cover.out -covermode=atomic \
-exec="${GO_JS_WASM_EXEC}" \
-v ./...
-coverprofile=cover.out -covermode=atomic \
-exec="${GO_JS_WASM_EXEC}" \
-v ./...
- uses: codecov/codecov-action@v1
with:

View File

@@ -15,5 +15,12 @@
"packagePatterns": ["^golang.org/x/"],
"schedule": ["on the first day of the month"]
}
],
"ignorePaths": [
".github/workflows/generate-authors.yml",
".github/workflows/lint.yaml",
".github/workflows/renovate-go-mod-fix.yaml",
".github/workflows/test.yaml",
".github/workflows/tidy-check.yaml"
]
}