Skip to content

Commit 6f3082c

Browse files
wip: Migrating circleci to github actions
1 parent 5504dc3 commit 6f3082c

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

.github/actions/ci/action.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Shared CI Workflow
2+
3+
inputs:
4+
java_version:
5+
description: 'The Java version to use.'
6+
required: true
7+
java_distribution:
8+
description: 'The Java distribution to use.'
9+
required: false
10+
default: temurin
11+
os_type:
12+
description: 'The OS type to use.'
13+
required: false
14+
default: ubuntu
15+
options:
16+
- ubuntu
17+
- windows
18+
19+
runs:
20+
using: composite
21+
steps:
22+
- name: Setup Java
23+
uses: actions/setup-java@v4
24+
with:
25+
distribution: ${{ inputs.java_distribution }}
26+
java-version: ${{ inputs.java_version }}
27+
28+
- name: Copy gradle.properties
29+
shell: bash
30+
run: |
31+
cp gradle.properties.example gradle.properties
32+
33+
- name: Restore Dependencies
34+
shell: bash
35+
run: ./gradlew dependencies
36+
37+
- name: Build Jar
38+
shell: bash
39+
id: buildjar
40+
run: ./gradlew jar
41+
42+
- name: Check Style
43+
shell: bash
44+
run: ./gradlew checkstyleMain
45+
46+
- name: Run Tests
47+
if: steps.buildjar.outcome == 'success'
48+
shell: bash
49+
run: ./gradlew test

.github/workflows/build-test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: [main, feat/**, abarker/**]
6+
paths-ignore:
7+
- '**.md' #Do not need to run CI for markdown changes.
8+
pull_request:
9+
branches: [main, feat/**]
10+
paths-ignore:
11+
- '**.md'
12+
13+
jobs:
14+
build-test-linux:
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest]
18+
# javaversion: [8, 11, 17, 19]
19+
javaversion: [8]
20+
runs-on: ${{ matrix.os }}
21+
steps:
22+
- uses: actions/checkout@v3
23+
24+
- name: Shared CI Steps
25+
uses: ./.github/actions/ci
26+
with:
27+
os_type: ubuntu
28+
java_version: ${{ matrix.javaversion }}
29+
30+
# build-test-windows:
31+
# strategy:
32+
# matrix:
33+
# os: [windows-latest]
34+
# javaversion: [11, 17]
35+
# runs-on: ${{ matrix.os }}
36+
# steps:
37+
# - uses: actions/checkout@v3
38+
39+
# - name: Shared CI Steps
40+
# uses: ./.github/actions/ci
41+
# with:
42+
# os_type: windows
43+
# java_version: ${{ matrix.javaversion }}

0 commit comments

Comments
 (0)