-
Notifications
You must be signed in to change notification settings - Fork 1
126 lines (118 loc) · 3.56 KB
/
Copy pathci.yml
File metadata and controls
126 lines (118 loc) · 3.56 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: CI
on:
pull_request:
branches: [main, master]
push:
branches: [main, master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
kotlin:
name: Kotlin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: true
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
- name: Test
working-directory: kotlin
# The Kotlin module is now a kotlin("multiplatform") project with a
# jvm() target. The top-level `test` task no longer exists — use
# `jvmTest` to run the JVM target's tests (equivalent to the old
# kotlin("jvm") `test` task). iOS targets are compile-only for now.
run: gradle jvmTest --quiet
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: kotlin-test-results
path: kotlin/build/reports/tests/
swift:
name: Swift
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
with:
submodules: true
- name: Test
working-directory: swift
run: swift test
python:
name: Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: true
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install deps
run: pip install pytest protobuf zstandard
- name: Test
working-directory: python
run: python -m pytest tests/ -v
typescript:
name: TypeScript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: true
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Install deps
working-directory: typescript
run: rm -f package-lock.json && npm install
- name: Test
working-directory: typescript
run: npx vitest run
csharp:
name: C#
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: true
- uses: actions/setup-dotnet@v5
with:
dotnet-version: "9.0.x"
- name: Test
working-directory: csharp
run: dotnet test --verbosity normal
publish-snapshot:
name: Publish Snapshot
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: [kotlin, swift, python, typescript, csharp]
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
with:
submodules: true
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
- name: Compute snapshot version
id: version
run: |
RELEASE_VERSION=$(grep '^VERSION_NAME=' kotlin/gradle.properties | cut -d= -f2)
IFS='.' read -r major minor patch <<< "$RELEASE_VERSION"
SNAPSHOT_VERSION="${major}.${minor}.$((patch + 1))-SNAPSHOT"
echo "snapshot=$SNAPSHOT_VERSION" >> "$GITHUB_OUTPUT"
- name: Publish to Maven Central (snapshots)
working-directory: kotlin
run: >-
gradle publishAllPublicationsToMavenCentralRepository
-PVERSION_NAME=${{ steps.version.outputs.snapshot }}
--stacktrace
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}