2023-03-16 20:43:49 +03:00
|
|
|
name: HLS tests
|
2021-10-07 07:03:48 +03:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
2022-06-30 00:34:37 +03:00
|
|
|
- 'web/**'
|
2021-10-07 07:03:48 +03:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
2022-06-30 00:34:37 +03:00
|
|
|
- 'web/**'
|
|
|
|
|
2021-10-07 07:03:48 +03:00
|
|
|
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:
|
2023-03-16 20:51:00 +03:00
|
|
|
tests:
|
2021-10-07 07:03:48 +03:00
|
|
|
runs-on: ubuntu-latest
|
2022-11-05 06:04:13 +03:00
|
|
|
|
2021-10-07 07:03:48 +03:00
|
|
|
steps:
|
2022-11-24 02:04:20 +03:00
|
|
|
- id: skip_check
|
|
|
|
uses: fkirc/skip-duplicate-actions@v5
|
|
|
|
with:
|
|
|
|
concurrent_skipping: 'same_content_newer'
|
2024-07-11 21:44:23 +03:00
|
|
|
|
2024-09-05 23:50:59 +03:00
|
|
|
- name: Check out pull request code
|
2024-07-11 21:47:33 +03:00
|
|
|
uses: actions/checkout@v4
|
2024-09-05 23:50:59 +03:00
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
with:
|
|
|
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
|
|
|
|
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
if: github.event_name == 'push'
|
2024-07-11 21:47:33 +03:00
|
|
|
|
2024-07-11 21:44:23 +03:00
|
|
|
- name: Get changed files
|
|
|
|
id: changed-files-yaml
|
2024-09-17 18:24:24 +03:00
|
|
|
uses: tj-actions/changed-files@v45
|
2024-07-11 21:44:23 +03:00
|
|
|
with:
|
|
|
|
files_yaml: |
|
|
|
|
src:
|
|
|
|
- '**/*.{go,mod,sum}'
|
|
|
|
|
2023-12-20 04:51:40 +03:00
|
|
|
- uses: actions/setup-go@v5
|
2024-07-11 21:44:23 +03:00
|
|
|
if: steps.changed-files-yaml.outputs.src_any_changed == 'true'
|
2021-10-12 00:56:00 +03:00
|
|
|
with:
|
2024-04-22 23:23:52 +03:00
|
|
|
go-version: '1.22'
|
2023-02-16 02:01:14 +03:00
|
|
|
cache: true
|
2023-01-23 08:07:49 +03:00
|
|
|
|
2023-02-16 01:46:45 +03:00
|
|
|
- name: Cache node modules
|
2024-03-04 05:45:28 +03:00
|
|
|
uses: actions/cache@v4
|
2023-02-16 01:46:45 +03:00
|
|
|
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 }}-
|
|
|
|
|
2023-03-16 20:43:49 +03:00
|
|
|
- name: Local stroage
|
2024-07-11 21:44:23 +03:00
|
|
|
if: steps.changed-files-yaml.outputs.src_any_changed == 'true'
|
2024-04-10 04:23:40 +03:00
|
|
|
uses: nick-fields/retry@v3
|
2023-01-23 08:07:49 +03:00
|
|
|
with:
|
|
|
|
timeout_minutes: 10
|
|
|
|
max_attempts: 3
|
|
|
|
command: cd test/automated/hls && ./run.sh
|
2023-03-16 20:43:49 +03:00
|
|
|
|
|
|
|
- name: S3 storage
|
2024-07-11 21:44:23 +03:00
|
|
|
if: steps.changed-files-yaml.outputs.src_any_changed == 'true'
|
2024-04-10 04:23:40 +03:00
|
|
|
uses: nick-fields/retry@v3
|
2023-03-16 20:43:49 +03:00
|
|
|
with:
|
|
|
|
timeout_minutes: 10
|
|
|
|
max_attempts: 3
|
|
|
|
command: cd test/automated/hls && ./run-s3.sh
|