Refactor media file and examples #22
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
name: Build & Test | |
on: | |
push: | |
branches: | |
- v2 | |
pull_request: | |
branches: | |
- v2 | |
jobs: | |
build_and_test: | |
name: Build & Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install FFmpeg | |
run: |- | |
sudo add-apt-repository ppa:ubuntuhandbook1/ffmpeg6 -y | |
sudo apt-get update -y | |
sudo apt-get install ffmpeg -y | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21.x' | |
- name: Install dependencies | |
run: go mod download | |
- name: Build | |
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 }} |