Skip to content

Commit

Permalink
separate GitHub actions for build and test
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomassetti committed Dec 6, 2023
1 parent 034e319 commit a194c07
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Basic Build

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
java: [ '11', '17' ]
name: Basic Build (Java ${{ matrix.Java }})

steps:
- uses: actions/checkout@v1
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Test
run: ./gradlew ciBasicBuild
6 changes: 3 additions & 3 deletions .github/workflows/check.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Basic Checks
name: Test

on: [push]

Expand All @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
java: [ '11', '17' ]
name: Basic Checks (Java ${{ matrix.Java }})
name: Test (Java ${{ matrix.Java }})

steps:
- uses: actions/checkout@v1
Expand All @@ -19,4 +19,4 @@ jobs:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Test
run: ./gradlew ciCheck
run: ./gradlew ciTest
8 changes: 6 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,16 @@ tasks {
}

tasks {
create("ciCheck") {
create("ciBasicBuild") {
dependsOn(":antlr-kotlin-runtime:compileKotlinJvm")
dependsOn(":antlr-kotlin-tests:compileKotlinJvm")
dependsOn(":antlr-kotlin-target:compileKotlin")
}

create("ciTest") {
dependsOn(":antlr-kotlin-runtime:jvmTest")
dependsOn(":antlr-kotlin-tests:jvmTest")
dependsOn(":antlr-kotlin-target:test")
}
}
}

0 comments on commit a194c07

Please sign in to comment.