Skip to content

Commit 1e60655

Browse files
committed
Remove useless ci/lib.sh and add script to push docker image
1 parent 2d4daf3 commit 1e60655

File tree

10 files changed

+18
-11
lines changed

10 files changed

+18
-11
lines changed

.circleci/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,6 @@ workflows:
8383
test:
8484
jobs:
8585
- test
86+
bench:
87+
jobs:
88+
- bench

ci/bench.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
set -euo pipefail
44
cd "$(dirname "${0}")"
5-
source ./lib.sh
5+
cd "$(git rev-parse --show-toplevel)"
66

7+
mkdir -p ci/out
78
go test -vet=off -run=^$ -bench=. -o=ci/out/websocket.test \
89
-cpuprofile=ci/out/cpu.prof \
910
-memprofile=ci/out/mem.prof \

ci/fmt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -euo pipefail
44
cd "$(dirname "${0}")"
5-
source ./lib.sh
5+
cd "$(git rev-parse --show-toplevel)"
66

77
gen() {
88
# Unfortunately, this is the only way to ensure go.mod and go.sum are correct.
File renamed without changes.

ci/image/push.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
cd "$(dirname "${0}")"
5+
6+
docker build -t nhooyr/websocket-ci .
7+
docker push nhooyr/websocket-ci

ci/lib.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

ci/lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -euo pipefail
44
cd "$(dirname "${0}")"
5-
source ./lib.sh
5+
cd "$(git rev-parse --show-toplevel)"
66

77
# shellcheck disable=SC2046
88
shellcheck -e SC1091 -x $(git ls-files "*.sh")

ci/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
set -euo pipefail
66
cd "$(dirname "${0}")"
7-
source ./lib.sh
7+
cd "$(git rev-parse --show-toplevel)"
88

99
./ci/fmt.sh
1010
./ci/lint.sh

ci/test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
set -euo pipefail
44
cd "$(dirname "${0}")"
5-
source ./lib.sh
5+
cd "$(git rev-parse --show-toplevel)"
66

7+
mkdir -p ci/out
78
# If you'd like to modify the args to go test, just run go test directly, this script is meant
89
# for running tests at the end to get coverage and test under the race detector.
910
go test -race -vet=off -coverprofile=ci/out/coverage.prof -coverpkg=./... ./...

docs/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ installation of shellcheck, node and the Autobahn test suite on Debian or Ubuntu
4040
For Go, please refer to the [offical docs](https://golang.org/doc/install).
4141

4242
You can benchmark the library with `./ci/benchmark.sh`. You only need Go to run that script. Benchmark
43-
profiles generated by that script are also available as artifacts on the bench step.
43+
profiles generated by that script are also available as artifacts on the bench step.

0 commit comments

Comments
 (0)