-
Notifications
You must be signed in to change notification settings - Fork 1
108 lines (89 loc) · 3.35 KB
/
Copy pathci.yml
File metadata and controls
108 lines (89 loc) · 3.35 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Lint, test, build
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
# app-android builds the React WebView UI (npm install + vite build) during
# :app-android:preBuild, so Node is required for the test + assemble steps.
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '24'
cache: npm
cache-dependency-path: react-ui/package-lock.json
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Lint gate (detekt + ktlint)
run: ./gradlew detekt ktlintCheck
# Exclude :e2e:test — it is CI-gated (runs on CI=true) and pulls Docker
# backends / needs the Go kopia binary; it is not a unit-test suite.
- name: Unit tests
run: ./gradlew test -x :e2e:test
- name: Assemble debug APK
run: ./gradlew :app-android:assembleDebug
integration-tests:
name: Storage integration tests (Docker)
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
# GitHub-hosted ubuntu runners ship a working Docker daemon, and Testcontainers uses it
# directly. Some local Docker setups (notably OrbStack) advertise an API version the bundled
# docker-java client rejects, so these tests skip there and CI is where they actually run:
# the S3 / SFTP / WebDAV BlobStorage integration tests, incl. the SFTP .shards cross-compat cases.
- name: Storage integration tests (Testcontainers)
run: ./gradlew :storage:integrationTest
go-interop:
name: Go cross-compatibility (kopia binary)
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
# The whole point of this project is that a repository written by the phone is readable by
# desktop Go kopia, and these tests are the only thing that checks it against the real binary.
# They were excluded along with the Docker-backed cases and stayed entirely red, undetected,
# until task-73 — so they get their own job that needs no Docker, only this binary.
- name: Install Go kopia
run: |
set -euo pipefail
curl -fsSL -o kopia.tar.gz \
"https://github.com/kopia/kopia/releases/download/v${KOPIA_VERSION}/kopia-${KOPIA_VERSION}-linux-x64.tar.gz"
tar -xzf kopia.tar.gz
sudo install -m 0755 "kopia-${KOPIA_VERSION}-linux-x64/kopia" /usr/local/bin/kopia
kopia --version
env:
KOPIA_VERSION: 0.23.1
- name: Go cross-compatibility tests
run: ./gradlew :e2e:goInteropTest