Skip to content

Commit

Permalink
Update CI and go.mod (#163)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
cristaloleg authored Apr 2, 2023
1 parent 26e4a44 commit 700ceca
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 12 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
26 changes: 22 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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: >-
Expand Down
22 changes: 16 additions & 6 deletions autobahn/docker/autobahn/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
2 changes: 1 addition & 1 deletion autobahn/docker/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=

0 comments on commit 700ceca

Please sign in to comment.