From c221aae553f0e7a5c1567131668101159fd5fd0e Mon Sep 17 00:00:00 2001 From: Paul van Santen Date: Thu, 30 May 2024 17:01:33 +0200 Subject: [PATCH 1/2] Upgrade CI pipelines a bit --- .github/workflows/golangci-lint.yaml | 11 +++++++++-- .github/workflows/test.yaml | 10 +++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index e98c5de..0a8e37d 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -9,11 +9,18 @@ on: - v2 pull_request: +permissions: + contents: read + jobs: golangci: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: '1.22' + cache: false - name: golangci-lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v3 \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6c48ea1..84114b5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -4,22 +4,22 @@ jobs: test: strategy: matrix: - go-version: [1.18.x, 1.19.x] + go-version: [1.22.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: Install Linux packages if: matrix.os == 'ubuntu-latest' - run: sudo apt update && sudo apt install -y --no-install-recommends ffmpeg + run: sudo apt install -y --no-install-recommends ffmpeg - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Test - run: go test -v ./... + run: go test -v -timeout 1m ./... From 661ddf093f434476cf96e902e89631df965963fe Mon Sep 17 00:00:00 2001 From: Paul van Santen Date: Thu, 30 May 2024 17:04:37 +0200 Subject: [PATCH 2/2] Use different FFMpeg version with actions --- .github/workflows/test.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 84114b5..741acef 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,9 +9,14 @@ jobs: runs-on: ${{ matrix.os }} steps: - - name: Install Linux packages - if: matrix.os == 'ubuntu-latest' - run: sudo apt install -y --no-install-recommends ffmpeg + - uses: FedericoCarboni/setup-ffmpeg@v3.1 + id: setup-ffmpeg + with: + # A specific version to download, may also be "release" or a specific version + # like "6.1.0". At the moment semver specifiers (i.e. >=6.1.0) are supported + # only on Windows, on other platforms they are allowed but version is matched + # exactly regardless. + ffmpeg-version: release - name: Install Go uses: actions/setup-go@v4