mirror of
https://github.com/owncast/owncast.git
synced 2024-11-28 11:09:01 +03:00
968af5f934
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Gabe Kangas <gabek@real-ity.com>
62 lines
1.6 KiB
YAML
62 lines
1.6 KiB
YAML
name: Automated API tests
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- 'web/**'
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'web/**'
|
|
|
|
jobs:
|
|
test:
|
|
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@v4
|
|
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'
|
|
|
|
- name: Get changed files
|
|
id: changed-files-yaml
|
|
uses: tj-actions/changed-files@v45
|
|
with:
|
|
files_yaml: |
|
|
src:
|
|
- '**/*.{go,mod,sum}'
|
|
|
|
- uses: earthly/actions-setup@v1
|
|
if: steps.changed-files-yaml.outputs.src_any_changed == 'true'
|
|
with:
|
|
version: 'latest' # or pin to an specific version, e.g. "v0.6.10"
|
|
|
|
- name: Earthly version
|
|
if: steps.changed-files-yaml.outputs.src_any_changed == 'true'
|
|
run: earthly --version
|
|
|
|
- name: Set up QEMU
|
|
if: steps.changed-files-yaml.outputs.src_any_changed == 'true'
|
|
id: qemu
|
|
uses: docker/setup-qemu-action@v3
|
|
with:
|
|
image: tonistiigi/binfmt:latest
|
|
platforms: all
|
|
|
|
- name: Run API tests
|
|
if: steps.changed-files-yaml.outputs.src_any_changed == 'true'
|
|
uses: nick-fields/retry@v3
|
|
with:
|
|
timeout_minutes: 10
|
|
max_attempts: 3
|
|
command: earthly +api-tests
|