diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..51a9367 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: gomod + directory: "/" + schedule: + interval: weekly + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 32d01a4..dc3af3d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,32 +1,50 @@ name: CI + on: push: branches: [ master ] pull_request: branches: [ master ] + schedule: + - cron: '0 10 * * 1' # run "At 10:00 on Monday" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: strategy: matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] - go: [ 1.15.x, 1.16.x ] + go: [ 'stable', 'oldstable' ] + runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go }} + check-latest: true - name: Go Env run: | go env + - name: Go Mod + run: | + go mod download + + - name: Go Mod Verify + run: | + go mod verify + - name: Test run: | - go test -v -race -cover ./... + go test -v -race -shuffle=on -cover ./... - name: Autobahn if: >- diff --git a/autobahn/docker/autobahn/Dockerfile b/autobahn/docker/autobahn/Dockerfile index 4651f6d..0726c39 100644 --- a/autobahn/docker/autobahn/Dockerfile +++ b/autobahn/docker/autobahn/Dockerfile @@ -1,11 +1,21 @@ -FROM alpine:3.12 +# Based on https://github.com/crossbario/autobahn-testsuite/blob/09cfbf74b0c8e335c6fc7df88e5c88349ca66879/docker/Dockerfile -RUN apk add --no-cache python2 python2-dev gcc build-base musl-dev libffi-dev openssl-dev && \ - python -m ensurepip && \ - pip install --upgrade pip && \ - pip install --no-python-version-warning autobahntestsuite +FROM pypy:2-slim + +# make "pypy" available as "python" +RUN ln -s /usr/local/bin/pypy /usr/local/bin/python + +# We need this to fix pip & cryptography +RUN apt-get update && apt-get install -y build-essential libssl-dev + +# install Autobahn|Testsuite +RUN pip install -U pip typing && \ + pip install autobahntestsuite=='0.8.2' VOLUME /config VOLUME /report -CMD ["/usr/bin/wstest", "--mode", "fuzzingclient", "--spec", "/config/fuzzingclient.json"] +WORKDIR / +EXPOSE 9001 9001 + +CMD ["wstest", "--mode", "fuzzingclient", "--spec", "/config/fuzzingclient.json"] diff --git a/autobahn/docker/server/Dockerfile b/autobahn/docker/server/Dockerfile index 008836a..e457c61 100644 --- a/autobahn/docker/server/Dockerfile +++ b/autobahn/docker/server/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.15.6-alpine3.12 +FROM golang:1.20.2-alpine3.17 WORKDIR /go/src/github.com/gobwas/ws diff --git a/go.mod b/go.mod index b0bc12a..146c70d 100644 --- a/go.mod +++ b/go.mod @@ -5,5 +5,5 @@ go 1.15 require ( github.com/gobwas/httphead v0.1.0 github.com/gobwas/pool v0.2.1 - golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d // indirect + golang.org/x/sys v0.6.0 // indirect ) diff --git a/go.sum b/go.sum index 40b998a..744c946 100644 --- a/go.sum +++ b/go.sum @@ -4,3 +4,5 @@ github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og= github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d h1:MiWWjyhUzZ+jvhZvloX6ZrUsdEghn8a64Upd8EMHglE= golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=