-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Re-arrange workflows to remove duplication (#410)
* ci: split kotlin tests into a new job It will then be easier to add new profiles as more versions of kotlin are supported. This also creates dependencies between jobs to only execute codecoverage when tests are successful. * ci: split gradle plugin test to a new job * ci: test-gradle-plugin after build * ci: merge native tests into main workflow * ci: clear names for the jobs * ci: re-org job needs * ci: create action to prepare local cache * ci: names again * ci: use new gradle wrapper validation action * ci: remove duplication to set up gradle cache * ci: only execute for pushes to the main branch * ci: activate kotlin-1.9 profile for code coverage
- Loading branch information
1 parent
190ced3
commit 6f5434e
Showing
7 changed files
with
167 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: "Gradle Cache Action" | ||
description: "Sets up Gradle Cache" | ||
|
||
inputs: | ||
key: | ||
required: true | ||
description: "The cache key" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
# Adapted from https://github.com/actions/cache/blob/v3/examples.md#java---gradle | ||
- name: Cache Gradle local repository | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-${{ inputs.key }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ inputs.key }}- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: "Prepare Cache Action" | ||
description: "Prevents local published artifacts from be added to GH Actions cache" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: "Clean local artifacts" | ||
if: contains(runner.os, 'win') == false | ||
run: rm -rvf ~/.m2/repository/gg/jte | ||
shell: bash | ||
|
||
# `rm` syntax for Windows is different. Needs to use `-Force` since `-f` | ||
# is ambiguous (possible matches include: -Filter -Force). | ||
- name: "[Windows]: Clean local artifacts" | ||
if: contains(runner.os, 'win') | ||
run: rm -r -Force ~/.m2/repository/gg/jte | ||
shell: pwsh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters