Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update actions, golang to 1.20, sources-internal repo cloning, update websocket #39

Merged
merged 6 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 35 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,25 @@ jobs:
go-build-and-checks:
strategy:
matrix:
golang-ver: ["1.17", "1.18", "1.19", "1.20"]
golang-ver: ["1.19", "1.20", "1.21", "1.22"]
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up golang
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.golang-ver }}
- name: Set GitHub access token via git config
run: |
git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github.com/".insteadOf "git@github.com:"
git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github".insteadOf "https://github"
- name: Check out scripts-internal repo
uses: actions/checkout@v4
with:
repository: PelionIoT/scripts-internal
path: scripts-internal
token: ${{ secrets.ACCESS_TOKEN }}
- run: go version
- run: |
sudo apt-get update && \
DEBIAN_FRONTEND="noninteractive" sudo apt-get install -y golint
- run: git clone git@github.com:PelionIoT/scripts-internal.git
- name: Build all
run: scripts-internal/golang/go_build_script.sh
- name: Run go vet
Expand All @@ -49,26 +50,30 @@ jobs:
strategy:
matrix:
# Can't run tests with 1.17 due to any requirement from ginkgo.
golang-ver: ["1.18", "1.19", "1.20"]
golang-ver: ["1.19", "1.20", "1.21", "1.22"]
runs-on: ubuntu-latest
env:
CLOUD_API_KEY : ${{ secrets.EDGE_PROXY_CI_CLOUD_ACCESS__KEY }}
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up golang
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.golang-ver }}
- name: Set GitHub access token via git config
run: |
git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github.com/".insteadOf "git@github.com:"
git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github".insteadOf "https://github"
- name: Check out scripts-internal repo
uses: actions/checkout@v4
with:
repository: PelionIoT/scripts-internal
path: scripts-internal
token: ${{ secrets.ACCESS_TOKEN }}
- run: go version
- name: Clone scripts-internal and mbed-edge repos
run: |
git clone git@github.com:PelionIoT/scripts-internal.git
git clone git@github.com:PelionIoT/mbed-edge.git
- name: Check out mbed-edge repo
uses: actions/checkout@v4
with:
repository: PelionIoT/mbed-edge
path: mbed-edge
token: ${{ secrets.ACCESS_TOKEN }}
- name: Get pre-requisites
run: |
sudo apt-get update && \
Expand All @@ -86,7 +91,17 @@ jobs:
- name: Run go tests against mbed-edge
run: |
mbed-edge/build/bin/edge-core &
sleep 3
sleep 15
for i in {1..10}; do
status=$(curl --silent localhost:8080/status | jq -r '.status')
if [[ "$status" == "connected" ]]; then
echo "Status is connected"
break
else
echo "Status is $status, retrying in 5 seconds"
sleep 5
fi
done
scripts-internal/golang/go_test_script.sh --all
- name: Cleanup - kill edge-core and delete device
if: always()
Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module github.com/PelionIoT/edge-proxy

go 1.18
go 1.20

replace github.com/gorilla/websocket v1.4.2 => github.com/pelioniot/websocket v1.4.2-1
replace github.com/gorilla/websocket v1.5.1 => github.com/pelioniot/websocket v1.5.1-3

require (
github.com/PelionIoT/remotedialer v1.0.4
github.com/elazarl/goproxy v0.0.0-20210110162100-a92cc753f88e
github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2
github.com/gorilla/websocket v1.4.2
github.com/gorilla/websocket v1.5.1
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.26.0
)
Expand All @@ -19,9 +19,9 @@ require (
github.com/nxadm/tail v1.4.8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/sirupsen/logrus v1.7.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q=
github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM=
github.com/pelioniot/websocket v1.4.2-1 h1:ke1NcjeGtj9SWqhdCd9qJgX7nS3o6RYdod0RsZaLTw0=
github.com/pelioniot/websocket v1.4.2-1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/pelioniot/websocket v1.5.1-3 h1:aF8M/8I9hU473wSaBlokC8bEdoDBSD242RNMtx/u4lI=
github.com/pelioniot/websocket v1.5.1-3/go.mod h1:ZEWNVsjgTGBOTTYdxizqmz0uZAvwUQoFyKvtDJqfdiM=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand All @@ -61,8 +61,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -76,12 +76,12 @@ golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
Expand Down
20 changes: 20 additions & 0 deletions vendor/github.com/gorilla/websocket/.editorconfig

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 1 addition & 25 deletions vendor/github.com/gorilla/websocket/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/github.com/gorilla/websocket/.golangci.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions vendor/github.com/gorilla/websocket/AUTHORS

This file was deleted.

39 changes: 22 additions & 17 deletions vendor/github.com/gorilla/websocket/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions vendor/github.com/gorilla/websocket/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 10 additions & 38 deletions vendor/github.com/gorilla/websocket/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading