Skip to content

Commit d3121cc

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [Github Actions] lint and test actions splitted
1 parent f88a1ba commit d3121cc

File tree

2 files changed

+59
-3
lines changed

2 files changed

+59
-3
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# yamllint disable rule:line-length
2+
# This workflow uses actions that are not certified by GitHub.
3+
# They are provided by a third-party and are governed by
4+
# separate terms of service, privacy policy, and support
5+
# documentation.
6+
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
7+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
8+
# yamllint enable rule:line-length
9+
---
10+
11+
name: Java CI Tests with Gradle
12+
13+
on: # yamllint disable-line rule:truthy
14+
push:
15+
branches: ["main"]
16+
pull_request:
17+
# The branches below must be a subset of the branches above
18+
branches: ["main"]
19+
workflow_dispatch:
20+
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
gradle:
26+
name: Java Gradle CI Test
27+
28+
strategy:
29+
matrix:
30+
os: ["windows-2022", "ubuntu-24.04", "macos-14"]
31+
java: ['22', '23', '24']
32+
runs-on: ${{ matrix.os }}
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
- name: Set up JDK
37+
uses: actions/setup-java@v4
38+
with:
39+
java-version: ${{ matrix.java }}
40+
distribution: temurin
41+
42+
- name: Tool test
43+
run: |
44+
echo "Java version: ${{ matrix.java }}"
45+
java -version
46+
echo "OS: ${{ matrix.os }}"
47+
echo "Gradle version:"
48+
./gradlew --version
49+
- name: Validate Gradle wrapper
50+
uses: gradle/actions/wrapper-validation@v4
51+
52+
- name: Setup Gradle
53+
uses: gradle/actions/setup-gradle@v4
54+
55+
- name: Clean
56+
run: ./gradlew --console=verbose clean
57+
58+
- name: Lint
59+
run: ./gradlew --console=verbose checkstyleMain checkstyleTest

.github/workflows/java-gradle.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,5 @@ jobs:
5555
- name: Clean
5656
run: ./gradlew --console=verbose clean
5757

58-
- name: Lint
59-
run: ./gradlew --console=verbose checkstyleMain checkstyleTest
60-
6158
- name: Run tests
6259
run: ./gradlew --console=verbose test -x checkstyleMain checkstyleTest

0 commit comments

Comments
 (0)