Skip to content

Return a singleton iterator when the array is empty #35

Return a singleton iterator when the array is empty

Return a singleton iterator when the array is empty #35

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
java: [ 8, 11, 17, 21 ] # Test against Java LTS releases
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- name: Setup JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Generate code
run: ./gradlew generateCode --no-daemon
- name: Check for changes in generated code
id: diff
run: |
git diff --exit-code >/dev/null 2>&1
- name: Fail if submission doesn't include the latest generated code
if: ${{ always() && steps.diff.outcome != 'success' }}
run: |
echo "Generated files changed. Run './gradlew generateCode' after changing the code generators and include the updated files with your submission."
exit 1
- name: Build & run tests
run: ./gradlew build --no-daemon
- name: Upload test report if failed
if: failure() # Only upload the build report if the previous step failed
uses: actions/upload-artifact@v4
with:
name: Test report
path: |
**/build/reports/tests/test/*
build/reports/tests/test/*