Skip to content

Commit

Permalink
chore: updates build actions (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonydmays authored Mar 15, 2024
1 parent 1e62c4b commit 202db1f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/check_lesson_08_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check Lesson 08 Pull Request

on:
pull_request:
branches: [ "main" ]
paths:
- "lesson_08/collections/**"

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

- name: Build Lesson 08 with Gradle Wrapper
working-directory: ./lesson_08/collections
run: ./gradlew check


6 changes: 6 additions & 0 deletions .github/workflows/check_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
- "lesson_04/expression/**"
- "lesson_05/types/**"
- "lesson_06/conditionals/**"
- "lesson_07/objects/**"
- "lesson_08/collections/**"

jobs:
build:
Expand Down Expand Up @@ -55,6 +57,10 @@ jobs:
working-directory: ./lesson_07/objects
run: ./gradlew assemble && ./gradlew spotlessCheck

- name: Build Lesson 08 with Gradle Wrapper
working-directory: ./lesson_08/collections
run: ./gradlew assemble && ./gradlew spotlessCheck

- name: Build Shared Lib with Gradle Wrapper
working-directory: ./lib/java/codedifferently-instructional
run: ./gradlew check
Expand Down
3 changes: 3 additions & 0 deletions lesson_08/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@

## Coding Interview questions

To complete this assignment, please implement the functions in [Lesson8.java][lesson-link] and submit a pull request with your solutions.

* Find a cycle in a LinkedList.
* Complete function that returns whether an array of elements contains a duplicate.
* Write a function that returns the maximum path of a tree.

[lesson-link]: ./collections/collections_app/src/main/java/com/codedifferently/lesson8/Lesson8.java

0 comments on commit 202db1f

Please sign in to comment.