Skip to content

Commit 3b36730

Browse files
committed
chore: start implementation on github actions
1 parent 875cbcf commit 3b36730

File tree

6 files changed

+127
-9
lines changed

6 files changed

+127
-9
lines changed

.github/renovate.json5

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:recommended",
5+
],
6+
"packageRules": [
7+
]
8+
}

.github/workflows/ci.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
name: "ci_checks"
3+
"on":
4+
pull_request: null
5+
push:
6+
branches:
7+
- "main"
8+
- "initial-version"
9+
workflow_dispatch: null
10+
concurrency:
11+
group: "${{ github.workflow }}-${{ github.ref }}"
12+
cancel-in-progress: true
13+
jobs:
14+
gradleCheck:
15+
name: "run checks using gradlew"
16+
runs-on: "ubuntu-latest"
17+
env:
18+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: "15"
19+
steps:
20+
- name: "Checkout"
21+
uses: "actions/checkout@v4"
22+
with:
23+
fetch-depth: 0
24+
- name: "Install JDK 21"
25+
uses: "actions/setup-java@v4"
26+
with:
27+
distribution: "graalvm"
28+
java-version: 21
29+
- name: "Install Node.js"
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: "lts/*"
33+
- name: "Setup Gradle"
34+
uses: "gradle/actions/setup-gradle@v4"
35+
- name: "Run check on build-logic subproject"
36+
run: "./gradlew :build-logic:check --no-configuration-cache"
37+
- name: "Make sure usage files are up to date"
38+
run: "./gradlew generateUsage"
39+
- name: "Run check on project"
40+
run: "./gradlew check"
41+
- name: "junit result"
42+
uses: "mikepenz/action-junit-report@v4"
43+
if: "always()"
44+
with:
45+
check_name: "JUnit Report"
46+
report_paths: "**/build/test-results/test/*.xml"
47+
nativeCompile:
48+
name: "run nativeCompile on relevant platforms"
49+
needs: "gradleCheck"
50+
strategy:
51+
matrix:
52+
runner:
53+
- "ubuntu-latest"
54+
- "ubuntu-24.04-arm"
55+
- "windows-latest"
56+
- "macos-latest"
57+
- "macos-13"
58+
fail-fast: false
59+
runs-on: "${{ matrix.runner }}"
60+
env:
61+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: "15"
62+
BUILDCACHE_LOCAL_DEFAULT_DIRECTORY: "true"
63+
steps:
64+
- name: "Checkout"
65+
uses: "actions/checkout@v4"
66+
with:
67+
fetch-depth: 0
68+
- name: "Install JDK 21"
69+
uses: "actions/setup-java@v4"
70+
with:
71+
distribution: "graalvm"
72+
java-version: 21
73+
- name: "Install Node.js"
74+
uses: actions/setup-node@v4
75+
with:
76+
node-version: "lts/*"
77+
- name: "Setup Gradle"
78+
uses: "gradle/actions/setup-gradle@v4"
79+
- name: "Run gradle build"
80+
run: "./gradlew nativeCompile"
81+
- name: "Check if binary works"
82+
run: "./gradlew testCliNative testCliNativeNpm"
83+
- name: "junit result"
84+
uses: "mikepenz/action-junit-report@v4"
85+
if: "always()"
86+
with:
87+
check_name: "JUnit Report"
88+
report_paths: "**/build/test-results/test/*.xml"

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ output = [
2020

2121
<!---freshmark /shields -->
2222

23-
> [!NOTE]\
23+
> [!NOTE]
2424
> This project is a work in progress :hourglass_flowing_sand: and not yet released.
2525
>
2626
> Please check back later for the first release. :heart:
@@ -92,12 +92,12 @@ This will show you the available options and formatters as such:
9292

9393
<!---freshmark usage_main
9494
output =
95-
'```shell\n' +
95+
'```\n' +
9696
{{usage.main.array}}.join('\n') +
9797
'\n```';
9898
-->
9999

100-
```shell
100+
```
101101
__ __
102102
_________ ____ / /_/ /__ __________
103103
/ ___/ __ \/ __ \/ __/ / _ \/ ___/ ___/
@@ -162,12 +162,12 @@ To see usage instructions for the google-java-format formatter, run: `spotless g
162162

163163
<!---freshmark usage_google_java_format
164164
output =
165-
'```shell\n' +
165+
'```\n' +
166166
{{usage.google-java-format.array}}.join('\n') +
167167
'\n```';
168168
-->
169169

170-
```shell
170+
```
171171
Usage: spotless google-java-format [-hijrV] [-s=<style>]
172172
Runs google java format
173173
-h, --help Show this help message and exit.
@@ -200,12 +200,12 @@ To see usage instructions for the license-header formatter, run: `spotless licen
200200

201201
<!---freshmark usage_license_header
202202
output =
203-
'```shell\n' +
203+
'```\n' +
204204
{{usage.license-header.array}}.join('\n') +
205205
'\n```';
206206
-->
207207

208-
```shell
208+
```
209209
Usage: spotless license-header [-hV] [-c=<contentPattern>] [-d=<delimiter>]
210210
[-m=<yearMode>] [-s=<skipLinesMatching>]
211211
[-Y=<yearSeparator>] (-H=<header> |
@@ -261,12 +261,12 @@ To see usage instructions for the prettier formatter, run: `spotless prettier --
261261

262262
<!---freshmark usage_prettier
263263
output =
264-
'```shell\n' +
264+
'```\n' +
265265
{{usage.prettier.array}}.join('\n') +
266266
'\n```';
267267
-->
268268

269-
```shell
269+
```
270270
Usage: spotless prettier [-hV] [-C=<cacheDir>] [-n=<explicitNpmExecutable>]
271271
[-N=<explicitNodeExecutable>]
272272
[-P=<prettierConfigPath>] [-R=<explicitNpmrcFile>]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
plugins {
2+
id 'buildlogic.spotless-common-conventions'
3+
}
4+
5+
spotless {
6+
format 'json', {
7+
target '.github/**/*.json', '*.json', 'src/**/*.json'
8+
prettier()
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
plugins {
2+
id 'buildlogic.spotless-common-conventions'
3+
}
4+
5+
spotless {
6+
yaml {
7+
target '.github/workflows/*.yml'
8+
prettier()
9+
}
10+
}

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
plugins {
22
id 'buildlogic.spotless-gradle-conventions'
3+
id 'buildlogic.spotless-json-conventions'
34
id 'buildlogic.spotless-markdown-conventions'
5+
id 'buildlogic.spotless-yaml-conventions'
46
id 'buildlogic.changelog-conventions'
57
}
68

0 commit comments

Comments
 (0)