Skip to content

Update README

Update README #6

Workflow file for this run

name: Java CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Create tests directory
run: mkdir -p tests
- name: Download JUnit Platform Console Standalone
run: |
wget https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/1.9.2/junit-platform-console-standalone-1.9.2.jar
- name: Compile Java files
run: |
# First compile the main source files
javac -d . *.java
# Then compile the test files with JUnit in classpath
javac -d . -cp "junit-platform-console-standalone-1.9.2.jar${PATH_SEPARATOR}." tests/*.java
env:
PATH_SEPARATOR: ${{ runner.os == 'Windows' && ';' || ':' }}
- name: Run tests
run: |
java -jar junit-platform-console-standalone-1.9.2.jar --class-path . --scan-class-path
env:
PATH_SEPARATOR: ${{ runner.os == 'Windows' && ';' || ':' }}