-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
2,767 additions
and
1,980 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,33 @@ | ||
name: Build & Test | ||
on: | ||
push: | ||
branches: [master] | ||
branches: | ||
- master | ||
- v2 | ||
pull_request: | ||
branches: [master] | ||
branches: | ||
- master | ||
- v2 | ||
|
||
jobs: | ||
build: | ||
build_and_test: | ||
name: Build & Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install FFmpeg | ||
run: sudo apt-get update && sudo apt-get install ffmpeg | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21.x" | ||
go-version: '1.21.x' | ||
- name: Install dependencies | ||
run: go get . | ||
- name: Install FFmpeg | ||
run: sudo apt-get update && sudo apt-get install ffmpeg | ||
run: go mod download | ||
- name: Build | ||
run: go build -v ./... | ||
- name: Test with the Go CLI | ||
run: go test --failfast -v ./... | ||
run: go build -ldflags="-s -w" -o ./bin/ ./... | ||
- name: Test with coverage | ||
run: go test --failfast -v ./... -coverprofile=coverage.out -covermode=atomic -coverpkg=./... | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
|
||
.PHONY: all | ||
all: test | ||
|
||
.PHONY: test build | ||
test: | ||
go test -v ./... -coverprofile=coverage.out -covermode=atomic -coverpkg=./... | ||
go test --failfast -v ./... -coverprofile=coverage.out -covermode=atomic -coverpkg=./... | ||
|
||
.PHONY: build | ||
build: | ||
go build -ldflags="-s -w" -o ./bin/ ./... | ||
|
||
.PHONY: coverage-html | ||
coverage-html: | ||
go tool cover -html=coverage.out | ||
go tool cover -html=coverage.out | ||
|
||
.PHONY: coverage-total | ||
coverage-total: | ||
go tool cover -func=coverage.out | grep total | awk '{print $$3}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Empty file.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.