Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into MM-45894
Browse files Browse the repository at this point in the history
  • Loading branch information
streamer45 committed Sep 27, 2024
2 parents c18fe28 + 466f6a8 commit 3c0ace4
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 32 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,22 @@ jobs:
run:
working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}

strategy:
matrix:
go-version: [1.21.x]

runs-on: ubuntu-latest-4-cores

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
go-version-file: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}/go.mod
cache-dependency-path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}/go.sum
- name: Install Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '20.11'
- name: Checkout Code
uses: actions/checkout@v2
with:
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
- name: Execute Tests
run: |
go mod download
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,15 @@ permissions:
jobs:
golangci:
name: lint
strategy:
matrix:
go-version: [1.21.x]
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout Code
uses: actions/checkout@v2
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v6
with:
version: v1.57.2

# Optional: if set to true then the action will use pre-installed Go.
skip-go-installation: true
version: v1.61.0
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ linters:
- ineffassign # Detects when assignments to existing variables are not used
- unconvert # Removes unnecessary type conversions
- unused # Checks Go code for unused constants, variables, functions and types
- exportloopref # Checks for pointers to enclosing loop variables
- copyloopvar # Checks for pointers to enclosing loop variables
- errcheck # Detects unchecked errors
- misspell # Finds commonly misspelled English words
- goimports # Check import statements are formatted according to the 'goimports' command
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ DOCKER_TAG ?= ${APP_NAME}:${APP_VERSION}
DOCKER_USER ?= user
DOCKER_PASSWORD ?= password
## Docker Images
DOCKER_IMAGE_GO ?= "golang:${GO_VERSION}@sha256:81811f8a883e238666dbadee6928ae2902243a3cd3f3e860f21c102543c6b5a7"
DOCKER_IMAGE_GO ?= "golang:${GO_VERSION}@sha256:027bd04b1d3b4529bf8ccebf62eb7eeeae7b7bef134a68bd419824e929ad93ad"
DOCKER_IMAGE_GOLINT += "golangci/golangci-lint:v1.57.2@sha256:8f3a60a00a83bb7d599d2e028ac0c3573dc2b9ec0842590f1c2e59781c821da7"
DOCKER_IMAGE_DOCKERLINT += "hadolint/hadolint:v2.12.0@sha256:9259e253a4e299b50c92006149dd3a171c7ea3c5bd36f060022b5d2c1ff0fbbe"
DOCKER_IMAGE_COSIGN ?= "bitnami/cosign:1.8.0@sha256:8c2c61c546258fffff18b47bb82a65af6142007306b737129a7bd5429d53629a"
Expand Down
8 changes: 4 additions & 4 deletions client/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ func (th *TestHelper) screenTrackWriter(track *webrtc.TrackLocalStaticRTP, close
// Open a IVF file and start reading using our IVFReader
file, ivfErr := os.Open(filename)
if ivfErr != nil {
log.Fatalf(ivfErr.Error())
log.Fatal(ivfErr.Error())
}
defer file.Close()

ivf, header, ivfErr := ivfreader.NewWith(file)
if ivfErr != nil {
log.Fatalf(ivfErr.Error())
log.Fatal(ivfErr.Error())
}

// Send our video file frame at a time. Pace our sending so we send it at the same speed it should be played back as.
Expand Down Expand Up @@ -125,14 +125,14 @@ func (th *TestHelper) screenTrackWriter(track *webrtc.TrackLocalStaticRTP, close
_, _ = file.Seek(0, 0)
ivf, header, ivfErr = ivfreader.NewWith(file)
if ivfErr != nil {
log.Fatalf(ivfErr.Error())
log.Fatal(ivfErr.Error())
}
return file
})
frame, _, ivfErr = ivf.ParseNextFrame()
}
if ivfErr != nil {
log.Fatalf(ivfErr.Error())
log.Fatal(ivfErr.Error())
}

packets := packetizer.Packetize(frame, 90000/header.TimebaseDenominator)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/mattermost/rtcd

go 1.21.9
go 1.22.7

require (
git.mills.io/prologic/bitcask v1.0.2
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,6 @@ github.com/pion/transport/v2 v2.2.2/go.mod h1:OJg3ojoBJopjEeECq2yJdXH9YVrUJ1uQ++
github.com/pion/transport/v2 v2.2.3/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0=
github.com/pion/transport/v2 v2.2.4 h1:41JJK6DZQYSeVLxILA2+F4ZkKb4Xd/tFJZRFZQ9QAlo=
github.com/pion/transport/v2 v2.2.4/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0=
github.com/pion/transport/v2 v2.2.5 h1:iyi25i/21gQck4hfRhomF6SktmUQjRsRW4WJdhfc3Kc=
github.com/pion/transport/v2 v2.2.5/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0=
github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0=
github.com/pion/transport/v3 v3.0.2 h1:r+40RJR25S9w3jbA6/5uEPTzcdn7ncyU44RWCbHkLg4=
github.com/pion/transport/v3 v3.0.2/go.mod h1:nIToODoOlb5If2jF9y2Igfx3PFYWfuXi37m0IlWa/D0=
Expand Down

0 comments on commit 3c0ace4

Please sign in to comment.