Skip to content

Commit 700ceca

Browse files
authored
Update CI and go.mod (#163)
- Updated golang.org/x/sys to v0.6.0 - Fixed autobahn docker - Updated CI to use stable and oldstable Go releases - Run CI by cron - Dependabot
1 parent 26e4a44 commit 700ceca

File tree

6 files changed

+52
-12
lines changed

6 files changed

+52
-12
lines changed

.github/dependabot.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
- package-ecosystem: github-actions
8+
directory: "/"
9+
schedule:
10+
interval: weekly

.github/workflows/main.yml

+22-4
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,50 @@
11
name: CI
2+
23
on:
34
push:
45
branches: [ master ]
56
pull_request:
67
branches: [ master ]
8+
schedule:
9+
- cron: '0 10 * * 1' # run "At 10:00 on Monday"
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
715
jobs:
816
test:
917
strategy:
1018
matrix:
1119
os: [ ubuntu-latest, macos-latest, windows-latest ]
12-
go: [ 1.15.x, 1.16.x ]
20+
go: [ 'stable', 'oldstable' ]
21+
1322
runs-on: ${{ matrix.os }}
1423
steps:
1524
- name: Checkout
16-
uses: actions/checkout@v2
25+
uses: actions/checkout@v3
1726

1827
- name: Setup Go
19-
uses: actions/setup-go@v2
28+
uses: actions/setup-go@v4
2029
with:
2130
go-version: ${{ matrix.go }}
31+
check-latest: true
2232

2333
- name: Go Env
2434
run: |
2535
go env
2636
37+
- name: Go Mod
38+
run: |
39+
go mod download
40+
41+
- name: Go Mod Verify
42+
run: |
43+
go mod verify
44+
2745
- name: Test
2846
run: |
29-
go test -v -race -cover ./...
47+
go test -v -race -shuffle=on -cover ./...
3048
3149
- name: Autobahn
3250
if: >-

autobahn/docker/autobahn/Dockerfile

+16-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
FROM alpine:3.12
1+
# Based on https://github.com/crossbario/autobahn-testsuite/blob/09cfbf74b0c8e335c6fc7df88e5c88349ca66879/docker/Dockerfile
22

3-
RUN apk add --no-cache python2 python2-dev gcc build-base musl-dev libffi-dev openssl-dev && \
4-
python -m ensurepip && \
5-
pip install --upgrade pip && \
6-
pip install --no-python-version-warning autobahntestsuite
3+
FROM pypy:2-slim
4+
5+
# make "pypy" available as "python"
6+
RUN ln -s /usr/local/bin/pypy /usr/local/bin/python
7+
8+
# We need this to fix pip & cryptography
9+
RUN apt-get update && apt-get install -y build-essential libssl-dev
10+
11+
# install Autobahn|Testsuite
12+
RUN pip install -U pip typing && \
13+
pip install autobahntestsuite=='0.8.2'
714

815
VOLUME /config
916
VOLUME /report
1017

11-
CMD ["/usr/bin/wstest", "--mode", "fuzzingclient", "--spec", "/config/fuzzingclient.json"]
18+
WORKDIR /
19+
EXPOSE 9001 9001
20+
21+
CMD ["wstest", "--mode", "fuzzingclient", "--spec", "/config/fuzzingclient.json"]

autobahn/docker/server/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.15.6-alpine3.12
1+
FROM golang:1.20.2-alpine3.17
22

33
WORKDIR /go/src/github.com/gobwas/ws
44

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ go 1.15
55
require (
66
github.com/gobwas/httphead v0.1.0
77
github.com/gobwas/pool v0.2.1
8-
golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d // indirect
8+
golang.org/x/sys v0.6.0 // indirect
99
)

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
44
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
55
golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d h1:MiWWjyhUzZ+jvhZvloX6ZrUsdEghn8a64Upd8EMHglE=
66
golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
7+
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
8+
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

0 commit comments

Comments
 (0)