Skip to content

Commit f445f21

Browse files
pionbotat-wat
authored andcommitted
Update CI configs to v0.5.9
Update lint scripts and CI configs.
1 parent 3af8018 commit f445f21

File tree

4 files changed

+73
-24
lines changed

4 files changed

+73
-24
lines changed

.github/workflows/generate-authors.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#
2+
# DO NOT EDIT THIS FILE
3+
#
4+
# It is automatically copied from https://github.com/pion/.goassets repository.
5+
# If this repository should have package specific CI config,
6+
# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
7+
#
8+
# If you want to update the shared CI config, send a PR to
9+
# https://github.com/pion/.goassets instead of this repository.
10+
#
11+
112
name: generate-authors
213

314
on:
@@ -52,11 +63,11 @@ jobs:
5263
run: |
5364
echo "::set-output name=msg::$(git status -s | wc -l)"
5465
55-
- uses: stefanzweifel/git-auto-commit-action@v4
66+
- name: Commit and push
5667
if: ${{ steps.git-status-output.outputs.msg != '0' }}
57-
with:
58-
commit_message: ${{ steps.last-commit-message.outputs.msg }}
59-
commit_author: ${{ steps.last-commit-author.outputs.msg }}
60-
commit_options: '--amend --no-edit'
61-
push_options: '--force'
62-
skip_fetch: true
68+
run: |
69+
git config user.email $(echo "${{ steps.last-commit-author.outputs.msg }}" | sed 's/\(.\+\) <\(\S\+\)>/\2/')
70+
git config user.name $(echo "${{ steps.last-commit-author.outputs.msg }}" | sed 's/\(.\+\) <\(\S\+\)>/\1/')
71+
git add AUTHORS.txt
72+
git commit --amend --no-edit
73+
git push --force https://github.com/${GITHUB_REPOSITORY} $(git symbolic-ref -q --short HEAD)

.github/workflows/lint.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#
2+
# DO NOT EDIT THIS FILE
3+
#
4+
# It is automatically copied from https://github.com/pion/.goassets repository.
5+
# If this repository should have package specific CI config,
6+
# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
7+
#
8+
# If you want to update the shared CI config, send a PR to
9+
# https://github.com/pion/.goassets instead of this repository.
10+
#
11+
112
name: Lint
213
on:
314
pull_request:

.github/workflows/test.yaml

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#
2+
# DO NOT EDIT THIS FILE
3+
#
4+
# It is automatically copied from https://github.com/pion/.goassets repository.
5+
# If this repository should have package specific CI config,
6+
# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
7+
#
8+
# If you want to update the shared CI config, send a PR to
9+
# https://github.com/pion/.goassets instead of this repository.
10+
#
11+
112
name: Test
213
on:
314
push:
@@ -39,9 +50,17 @@ jobs:
3950
4051
- name: Run test
4152
run: |
53+
TEST_BENCH_OPTION="-bench=."
54+
if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
55+
4256
go-acc -o cover.out ./... -- \
43-
-bench=. \
44-
-v -race
57+
${TEST_BENCH_OPTION} \
58+
-v -race
59+
60+
- name: Run TEST_HOOK
61+
run: |
62+
if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
63+
if [ -n "${TEST_HOOK}" ]; then ${TEST_HOOK}; fi
4564
4665
- uses: codecov/codecov-action@v1
4766
with:
@@ -73,17 +92,17 @@ jobs:
7392
run: |
7493
mkdir -p $HOME/go/pkg/mod $HOME/.cache
7594
docker run \
76-
-u $(id -u):$(id -g) \
77-
-e "GO111MODULE=on" \
78-
-e "CGO_ENABLED=0" \
79-
-v $GITHUB_WORKSPACE:/go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
80-
-v $HOME/go/pkg/mod:/go/pkg/mod \
81-
-v $HOME/.cache:/.cache \
82-
-w /go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
83-
i386/golang:${{matrix.go}}-alpine \
84-
/usr/local/go/bin/go test \
85-
${TEST_EXTRA_ARGS:-} \
86-
-v ./...
95+
-u $(id -u):$(id -g) \
96+
-e "GO111MODULE=on" \
97+
-e "CGO_ENABLED=0" \
98+
-v $GITHUB_WORKSPACE:/go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
99+
-v $HOME/go/pkg/mod:/go/pkg/mod \
100+
-v $HOME/.cache:/.cache \
101+
-w /go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
102+
i386/golang:${{matrix.go}}-alpine \
103+
/usr/local/go/bin/go test \
104+
${TEST_EXTRA_ARGS:-} \
105+
-v ./...
87106
88107
test-wasm:
89108
runs-on: ubuntu-latest
@@ -119,17 +138,18 @@ jobs:
119138
run: echo "GOPATH=${HOME}/go" >> $GITHUB_ENV
120139

121140
- name: Set Go Path
122-
run: echo "GO_JS_WASM_EXEC=${PWD}/test-wasm/go_js_wasm_exec" >> $GITHUB_ENV
141+
run: echo "GO_JS_WASM_EXEC=${GOROOT}/misc/wasm/go_js_wasm_exec" >> $GITHUB_ENV
123142

124143
- name: Insall NPM modules
125144
run: yarn install
126145

127146
- name: Run Tests
128147
run: |
148+
if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
129149
GOOS=js GOARCH=wasm $GOPATH/bin/go test \
130-
-coverprofile=cover.out -covermode=atomic \
131-
-exec="${GO_JS_WASM_EXEC}" \
132-
-v ./...
150+
-coverprofile=cover.out -covermode=atomic \
151+
-exec="${GO_JS_WASM_EXEC}" \
152+
-v ./...
133153
134154
- uses: codecov/codecov-action@v1
135155
with:

renovate.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,12 @@
1515
"packagePatterns": ["^golang.org/x/"],
1616
"schedule": ["on the first day of the month"]
1717
}
18+
],
19+
"ignorePaths": [
20+
".github/workflows/generate-authors.yml",
21+
".github/workflows/lint.yaml",
22+
".github/workflows/renovate-go-mod-fix.yaml",
23+
".github/workflows/test.yaml",
24+
".github/workflows/tidy-check.yaml"
1825
]
1926
}

0 commit comments

Comments
 (0)