Skip to content

Commit

Permalink
enable tests #12
Browse files Browse the repository at this point in the history
  • Loading branch information
walterxie committed Aug 8, 2024
1 parent 44d37b1 commit 2cf8595
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 95 deletions.
86 changes: 0 additions & 86 deletions .github/workflows/lphybeast.ym

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: LPhyBeast test

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout LPhyBeastExt
uses: actions/checkout@v4
- name: Checkout LPhy
uses: actions/checkout@v4
with:
repository: LinguaPhylo/linguaPhylo
- name: Checkout LPhy
uses: actions/checkout@v4
with:
repository: LinguaPhylo/LPhyBeast

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Clean
run: mvn clean
# -B,--batch-mode Run in non-interactive (batch) mode (disables output color)
- name: Test with Maven
run: mvn -B test --file pom.xml

- name: Publish unit test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: ./LPhyBeast/*/target/surefire-reports/**/*.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

Expand All @@ -24,9 +25,12 @@ public class H3N2TutorialTest {

@BeforeEach
public void setUp() {
// load lphybeast-ext/build/lphybeast/version.xml
// load ../LPhyBeast/version.xml
Path lphybeastDir = Paths.get(UserDir.getUserDir().toAbsolutePath().getParent().toString(),
"lphybeast-ext","build","lphybeast");
"..","LPhyBeast");
if (!Files.exists(lphybeastDir))
throw new IllegalArgumentException("Cannot locate LPhyBeast Dir : " + lphybeastDir);

TestUtils.loadServices(lphybeastDir.toString());
// load mascot/version.xml
Path parentDir = UserDir.getUserDir().toAbsolutePath();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

Expand All @@ -26,10 +27,12 @@ public class LewisMKToBEASTTest {

@BeforeEach
public void setUp() {
// load lphybeast-ext/build/lphybeast/version.xml
// load ../LPhyBeast/version.xml
Path lphybeastDir = Paths.get(UserDir.getUserDir().toAbsolutePath().getParent().toString(),
"lphybeast-ext","build","lphybeast");
TestUtils.loadServices(lphybeastDir.toString());
"..","LPhyBeast");
if (!Files.exists(lphybeastDir))
throw new IllegalArgumentException("Cannot locate LPhyBeast Dir : " + lphybeastDir);

// load mm/version.xml
Path parentDir = UserDir.getUserDir().toAbsolutePath();
TestUtils.loadServices(parentDir.toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

Expand All @@ -27,9 +28,12 @@ class FossilBirthDeathTreeToBEASTTest {

@BeforeEach
public void setUp() {
// load lphybeast-ext/build/lphybeast/version.xml
// load ../LPhyBeast/version.xml
Path lphybeastDir = Paths.get(UserDir.getUserDir().toAbsolutePath().getParent().toString(),
"lphybeast-ext","build","lphybeast");
"..","LPhyBeast");
if (!Files.exists(lphybeastDir))
throw new IllegalArgumentException("Cannot locate LPhyBeast Dir : " + lphybeastDir);

TestUtils.loadServices(lphybeastDir.toString());
// load sa/version.xml
Path parentDir = UserDir.getUserDir().toAbsolutePath();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

Expand All @@ -24,9 +25,12 @@ class SimFBDAgeToBEASTTest {

@BeforeEach
public void setUp() {
// load lphybeast-ext/build/lphybeast/version.xml
// load ../LPhyBeast/version.xml
Path lphybeastDir = Paths.get(UserDir.getUserDir().toAbsolutePath().getParent().toString(),
"lphybeast-ext","build","lphybeast");
"..","LPhyBeast");
if (!Files.exists(lphybeastDir))
throw new IllegalArgumentException("Cannot locate LPhyBeast Dir : " + lphybeastDir);

TestUtils.loadServices(lphybeastDir.toString());
// load sa/version.xml
Path parentDir = UserDir.getUserDir().toAbsolutePath();
Expand Down

0 comments on commit 2cf8595

Please sign in to comment.