-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (70 loc) · 2.11 KB
/
Copy pathci.yml
File metadata and controls
86 lines (70 loc) · 2.11 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI
on:
push:
branches: ["dev"]
pull_request:
branches: ["dev", "main"]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
go:
runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-24.04' || fromJSON('["self-hosted","Linux","X64","arko","downloader"]') }}
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache: false
- name: Install FFmpeg development libraries
if: github.event_name == 'pull_request'
run: |
sudo apt-get update
sudo apt-get install --yes --no-install-recommends libavformat-dev libavcodec-dev libavutil-dev
- name: Isolate Go caches
run: |
echo "GOCACHE=$RUNNER_TEMP/go-build" >> "$GITHUB_ENV"
echo "GOMODCACHE=$RUNNER_TEMP/go-mod" >> "$GITHUB_ENV"
- name: Format check
run: test -z "$(gofmt -l cmd internal)"
- name: Test
run: go test ./...
- name: Build
run: go build ./...
- name: Validate scripts
run: |
bash -n scripts/e2e-beta.sh
bash -n scripts/bench-beta.sh
- name: Validate Compose config
env:
DB_PASSWORD: change-me
S3_ACCESS_KEY: change-me
S3_SECRET_KEY: change-me
run: docker compose config --quiet
docker:
if: github.event_name == 'pull_request'
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
with:
platforms: arm64
cache-image: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build Wolfi image
uses: docker/build-push-action@v7
with:
context: .
file: Dockerfile.wolfi
platforms: linux/amd64,linux/arm64
push: false
cache-from: type=gha
cache-to: type=gha,mode=max