Skip to content

Commit

Permalink
Merge pull request #251 from TAMULib/sprint-action-staging
Browse files Browse the repository at this point in the history
Sprint action staging
  • Loading branch information
wwelling committed Feb 3, 2021
2 parents 568ca96 + 3e01594 commit e1d492f
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 14 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,31 @@
name: Build

on: [ push, pull_request, workflow_dispatch ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: "Maven Cache"
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-cache-maven-${{ hashFiles('**/pom.xml') }}

- name: "Setup Java"
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: "Maven Test"
run: mvn clean test cobertura:cobertura jacoco:report coveralls:report -DdryRun=true

- name: "Send to Coveralls (build java-${{ github.run_number }})"
uses: MikeEdgar/github-action@raw_coverage_file
with:
github-token: ${{ secrets.github_token }}
path-to-file: './target/coveralls.json'
coverage-format: raw
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/TAMULib/MetadataAssignmentToolService.svg?branch=master)](https://travis-ci.org/TAMULib/MetadataAssignmentToolService)
[![Build Status](https://github.com/TAMULib/MetadataAssignmentToolService/workflows/Build/badge.svg)](https://github.com/TAMULib/MetadataAssignmentToolService/actions?query=workflow%3ABuild)
[![Coverage Status](https://coveralls.io/repos/github/TAMULib/MetadataAssignmentToolService/badge.svg)](https://coveralls.io/github/TAMULib/MetadataAssignmentToolService)

Metadata Assignment Service
Expand Down Expand Up @@ -442,4 +442,4 @@ mvn cobertura:cobertura OR mvn site
Location of the generated report :
```
<Application>/target/site/index.html
```
```
5 changes: 5 additions & 0 deletions pom.xml
Expand Up @@ -47,6 +47,11 @@
</snapshots>
</repository>

<repository>
<id>mvnrepository</id>
<name>Maven Central Repository</name>
<url>https://repo1.maven.org/maven2/</url>
</repository>
</repositories>

<dependencies>
Expand Down
Expand Up @@ -4,7 +4,6 @@
import static org.junit.Assert.assertEquals;

import java.io.File;
import java.io.IOException;

import org.junit.After;
import org.junit.Before;
Expand Down Expand Up @@ -57,8 +56,10 @@ public class FileObserverRegistryTest {
private File directory;

@Before
public void setUp() {
public void setUp() throws Exception {
directory = new File(ASSETS_PATH + File.separator + "temp");
registry.stop();
registry.start();
}

@Test
Expand Down Expand Up @@ -119,10 +120,12 @@ public void testHealthCheck() throws Exception {
}

@After
public void cleanUp() throws IOException {
public void cleanUp() throws Exception {
if (directory.exists()) {
FileSystemUtility.deleteDirectory(directory.getAbsolutePath());
}
registry.stop();
registry.start();
resourceRepo.deleteAll();
documentRepo.deleteAll();
projectRepo.deleteAll();
Expand Down

0 comments on commit e1d492f

Please sign in to comment.