From 202db1fd4818d2a209e753e01645d2325665fee7 Mon Sep 17 00:00:00 2001 From: "Anthony D. Mays" Date: Fri, 15 Mar 2024 13:47:47 -0700 Subject: [PATCH] chore: updates build actions (#225) --- .github/workflows/check_lesson_08_pr.yml | 33 ++++++++++++++++++++++++ .github/workflows/check_push.yml | 6 +++++ lesson_08/README.md | 3 +++ 3 files changed, 42 insertions(+) create mode 100644 .github/workflows/check_lesson_08_pr.yml diff --git a/.github/workflows/check_lesson_08_pr.yml b/.github/workflows/check_lesson_08_pr.yml new file mode 100644 index 00000000..886e8744 --- /dev/null +++ b/.github/workflows/check_lesson_08_pr.yml @@ -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 + + diff --git a/.github/workflows/check_push.yml b/.github/workflows/check_push.yml index d171452e..ee360a01 100644 --- a/.github/workflows/check_push.yml +++ b/.github/workflows/check_push.yml @@ -10,6 +10,8 @@ on: - "lesson_04/expression/**" - "lesson_05/types/**" - "lesson_06/conditionals/**" + - "lesson_07/objects/**" + - "lesson_08/collections/**" jobs: build: @@ -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 diff --git a/lesson_08/README.md b/lesson_08/README.md index 05a889ce..66ae8239 100644 --- a/lesson_08/README.md +++ b/lesson_08/README.md @@ -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 \ No newline at end of file