Skip to content

Commit

Permalink
WIP: Use java version specified in tool-versions
Browse files Browse the repository at this point in the history
  • Loading branch information
KaylaBrady committed Dec 19, 2023
1 parent e7e754f commit 5bb6dc3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ jobs:
- name: Read asdf versions
id: asdf
run: cat .tool-versions | sed 's/ /=/' | tee -a "$GITHUB_OUTPUT"
- name: Parse java version
id: java-spec
run: |
DISTRIBUTION=(`echo ${{steps.asdf.outputs.java}} | cut -d - -f1`)
VERSION=(`echo ${{steps.asdf.outputs.java}} | cut -d - -f2`)
echo "java-distribution=$DISTRIBUTION" >> "$GITHUB_OUTPUT"
echo "java-version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -35,15 +44,14 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
distribution: ${{steps.java-spec.outputs.java-distribution}}
java-version: ${{steps.java-spec.outputs.java-version}}
cache: gradle
- uses: actions/cache@v3
with:
path: ~/.konan
key: konan-${{ runner.os }}-${{ hashFiles('build.gradle.kts') }}
restore-keys: konan-${{ runner.os }}
# TODO: pre-commit run spotless
- run: ./gradlew spotlessCheck
- name: shared checks & unit tests
run: ./gradlew shared:check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ class AndroidGreetingTest {

@Test
fun testExample() {
// TODO: Switch back to assertTrue. See how test failure is represented in CI
assertTrue("Check Android is mentioned", Greeting().greet().contains("Android"))
}
}

0 comments on commit 5bb6dc3

Please sign in to comment.