Skip to content

Update main.yml

Update main.yml #5

Workflow file for this run

name: Java CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
container:
image: openjdk:11
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Grant execute permission for run.sh
run: chmod +x run.sh
- name: Print Java version
run: java --version
- name: Compile
run: ./run.sh compile
build_test:
needs: build
runs-on: ubuntu-latest
container:
image: openjdk:11
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Compile Tests
run: ./run.sh compileTests
test:
needs: build_test
runs-on: ubuntu-latest
container:
image: openjdk:11
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Test
run: ./run.sh test