Skip to content

Commit

Permalink
Update CI configs to v0.5.9
Browse files Browse the repository at this point in the history
Update lint scripts and CI configs.
  • Loading branch information
pionbot authored and at-wat committed Jul 21, 2021
1 parent 222e61e commit 0a9cbb8
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 23 deletions.
25 changes: 18 additions & 7 deletions .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:
Expand Down Expand Up @@ -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)
11 changes: 11 additions & 0 deletions .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:
Expand Down
52 changes: 36 additions & 16 deletions .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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions renovate.json
Expand Up @@ -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"
]
}

0 comments on commit 0a9cbb8

Please sign in to comment.