Repository navigation
63 lines (53 loc) · 1.71 KB
/
Copy pathunit-test.yml
File metadata and controls
63 lines (53 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Unit tests CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions: read-all
jobs:
tests:
name: Execute unit tests
runs-on: ubuntu-latest
permissions:
contents: write
env:
# bump: FFmpeg /FF_VERSION: '([\d.]+)'/ docker:mwader/static-ffmpeg|/\d+\./|*
FF_VERSION: '9.0.2'
steps:
- name: Checkout code changes
uses: actions/checkout@v7
- name: Cache FFmpeg binaries
id: cache-ffmpeg
uses: actions/cache@v6
with:
path: ${{ runner.temp }}/ffmpeg
key: ffmpeg-static-${{ runner.os }}-${{ env.FF_VERSION }}
- name: Setup FFmpeg
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
run: |
INSTALL_DIR="$RUNNER_TEMP/ffmpeg"
mkdir -p "$INSTALL_DIR"
CID=$(docker create "mwader/static-ffmpeg:$FF_VERSION")
docker export "$CID" | tar -xf - -C "$INSTALL_DIR" --wildcards 'ff*'
docker rm -v "$CID" > /dev/null
- name: Add FFmpeg to PATH
run: echo "$RUNNER_TEMP/ffmpeg" >> "$GITHUB_PATH"
- name: Setup Java
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 27
- name: Setup project and upload dependency graph
uses: gradle/actions/setup-gradle@v6
with:
dependency-graph: generate-and-submit
build-scan-publish: true
build-scan-terms-of-use-url: 'https://gradle.com/help/legal-terms-of-use'
build-scan-terms-of-use-agree: 'yes'
- name: Execute tests
run: ./gradlew check