Files
owncast/.github/workflows/hls-tests.yml
T
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
910d555e0d chore(deps): update dependency go to v1.26.1 (#4793)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-06 09:34:23 +00:00

103 lines
2.9 KiB
YAML

# This workflow tests HLS video streaming functionality
# Triggers:
# - Push/PR with Go file changes or HLS test changes
# Tests:
# - Local storage backend
# - S3 storage backend (when secrets available)
# - Retries up to 3 times for flaky network tests
name: HLS tests
on:
push:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- 'test/automated/hls/**'
- '.github/workflows/hls-tests.yml'
pull_request:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- 'test/automated/hls/**'
- '.github/workflows/hls-tests.yml'
env:
S3_BUCKET: ${{ secrets.S3_BUCKET }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
S3_REGION: ${{ secrets.S3_REGION }}
S3_SECRET: ${{ secrets.S3_SECRET }}
jobs:
tests:
runs-on: ubuntu-latest
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: 'same_content_newer'
- name: Check out pull request code
uses: actions/checkout@v6
if: github.event_name == 'pull_request'
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- name: Fetch base branch for comparison
if: github.event_name == 'pull_request'
run: |
git remote add upstream https://github.com/${{ github.event.pull_request.base.repo.full_name }}.git || true
git fetch upstream ${{ github.event.pull_request.base.ref }}
- name: Check out repository code
uses: actions/checkout@v6
if: github.event_name == 'push'
- name: Get changed files
id: changed-files-yaml
uses: tj-actions/changed-files@v47
with:
files_yaml: |
src:
- '**/*.{go,mod,sum}'
- uses: actions/setup-go@v6
if: steps.changed-files-yaml.outputs.src_any_changed == 'true'
with:
go-version: '1.26.1'
cache: true
- name: Cache node modules
uses: actions/cache@v5
env:
cache-name: cache-node-modules-hls-tests
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('test/automated/hls/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Local stroage
if: steps.changed-files-yaml.outputs.src_any_changed == 'true'
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: cd test/automated/hls && ./run.sh
- name: S3 storage
if: steps.changed-files-yaml.outputs.src_any_changed == 'true'
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: cd test/automated/hls && ./run-s3.sh