Skip to content

Commit

Permalink
initial CI
Browse files Browse the repository at this point in the history
  • Loading branch information
danny-prodbase committed Sep 2, 2023
1 parent 3858cc5 commit 24f5c2c
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Tests

on:
push:
paths:
- 'src/**'
- 'tests/**'
pull_request:
paths:
- 'src/**'
- 'tests/**'

jobs:
tests:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up JDK 20
uses: actions/setup-java@v3
with:
java-version: 20
distribution: 'adopt'

- name: Install Dependencies
run: |
mkdir -p lib
curl -L -o lib/mockito-core.jar https://repo1.maven.org/maven2/org/mockito/mockito-core/3.12.4/mockito-core-3.12.4.jar
curl -L -o lib/byte-buddy.jar https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy/1.12.6/byte-buddy-1.12.6.jar
curl -L -o lib/byte-buddy-agent.jar https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent/1.12.6/byte-buddy-agent-1.12.6.jar
curl -L -o lib/objenesis.jar https://repo1.maven.org/maven2/org/objenesis/objenesis/3.2/objenesis-3.2.jar
curl -L -o lib/junit-jupiter-api.jar https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar
curl -L -o lib/opentest4j.jar https://repo1.maven.org/maven2/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
curl -L -o lib/junit-platform-commons.jar https://repo1.maven.org/maven2/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar
curl -L -o lib/apiguardian-api.jar https://repo1.maven.org/maven2/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
curl -L -o lib/junit-jupiter-params.jar https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar
curl -L -o lib/junit-jupiter-engine.jar https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar
curl -L -o lib/junit-platform-engine.jar https://repo1.maven.org/maven2/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar
curl -L -o lib/junit-platform-launcher.jar https://repo1.maven.org/maven2/org/junit/platform/junit-platform-launcher/1.8.1/junit-platform-launcher-1.8.1.jar
curl -L -o lib/junit-platform-console-standalone.jar https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/1.8.1/junit-platform-console-standalone-1.8.1.jar
- name: Compile
run: |
javac -cp "lib/*" -d . src/*.java tests/*.java
- name: Run tests
run: |
java -cp ".:lib/*:**" org.junit.platform.console.ConsoleLauncher --scan-classpath --include-classname ".*Test"

0 comments on commit 24f5c2c

Please sign in to comment.