Adding TODO #224
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
name: Continuous Integration | |
on: | |
push: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
name: Tests - Java version ${{ matrix.java }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ '17', '20', '21' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: ${{ matrix.java }} | |
cache: 'gradle' | |
- run: make dependencies | |
- run: make all | |
- run: make test | |
check-format: | |
name: Check formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
cache: 'gradle' | |
- run: make check-format | |
publish: | |
needs: test | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'emichael/dslabs' }} | |
name: Publish handout | |
runs-on: ubuntu-latest | |
concurrency: publish-handout | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
cache: 'gradle' | |
- run: make build/handout/ | |
- run: | | |
cd build/handout/ | |
git init -b handout | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git add . | |
git commit -m "Committing built handout" | |
git push -f "https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" handout:handout | |
rm -rf .git | |
cd ../.. |