Skip to content

Commit f5edc41

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

File tree

6 files changed

+119
-9
lines changed

6 files changed

+119
-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: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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: "Setup Gradle"
30+
uses: "gradle/actions/setup-gradle@v4"
31+
- name: "Run check on build-logic subproject"
32+
run: "./gradlew :build-logic:check --no-configuration-cache"
33+
- name: "Make sure usage files are up to date"
34+
run: "./gradlew generateUsage"
35+
- name: "Run check on project"
36+
run: "./gradlew check"
37+
- name: "junit result"
38+
uses: "mikepenz/action-junit-report@v4"
39+
if: "always()"
40+
with:
41+
check_name: "JUnit Report"
42+
report_paths: "**/build/test-results/test/*.xml"
43+
nativeCompile:
44+
name: "run nativeCompile on relevant platforms"
45+
needs: "gradleCheck"
46+
strategy:
47+
matrix:
48+
runner:
49+
- "ubuntu-latest"
50+
- "ubuntu-24.04-arm"
51+
- "windows-latest"
52+
- "macos-latest"
53+
- "macos-13"
54+
fail-fast: false
55+
runs-on: "${{ matrix.runner }}"
56+
env:
57+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: "15"
58+
BUILDCACHE_LOCAL_DEFAULT_DIRECTORY: "true"
59+
steps:
60+
- name: "Checkout"
61+
uses: "actions/checkout@v4"
62+
with:
63+
fetch-depth: 0
64+
- name: "Install JDK 21"
65+
uses: "actions/setup-java@v4"
66+
with:
67+
distribution: "graalvm"
68+
java-version: 21
69+
- name: "Setup Gradle"
70+
uses: "gradle/actions/setup-gradle@v4"
71+
- name: "Run gradle build"
72+
run: "./gradlew nativeCompile"
73+
- name: "Check if binary works"
74+
run: "./gradlew testCliNative testCliNativeNpm"
75+
- name: "junit result"
76+
uses: "mikepenz/action-junit-report@v4"
77+
if: "always()"
78+
with:
79+
check_name: "JUnit Report"
80+
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)