From 0a9cbb81df6b93211e398ad5198df935138a5244 Mon Sep 17 00:00:00 2001 From: Pion <59523206+pionbot@users.noreply.github.com> Date: Wed, 21 Jul 2021 00:26:37 +0000 Subject: [PATCH] Update CI configs to v0.5.9 Update lint scripts and CI configs. --- .github/workflows/generate-authors.yml | 25 +++++++++---- .github/workflows/lint.yaml | 11 ++++++ .github/workflows/test.yaml | 52 ++++++++++++++++++-------- renovate.json | 7 ++++ 4 files changed, 72 insertions(+), 23 deletions(-) diff --git a/.github/workflows/generate-authors.yml b/.github/workflows/generate-authors.yml index e619025..83e7065 100644 --- a/.github/workflows/generate-authors.yml +++ b/.github/workflows/generate-authors.yml @@ -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) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index bc44c3a..f096078 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -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: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5b7a43b..7a72c2c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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 @@ -126,10 +145,11 @@ jobs: - 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: diff --git a/renovate.json b/renovate.json index f84608c..08c1e39 100644 --- a/renovate.json +++ b/renovate.json @@ -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" ] }