Skip to content

Commit 60f4e58

Browse files
authored
Migrate to Github Actions (#192)
1 parent d4c85aa commit 60f4e58

File tree

3 files changed

+52
-18
lines changed

3 files changed

+52
-18
lines changed

.github/workflows/tests.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# This is a github actions workflow which runs tests and publishes snapshots
2+
3+
name: Test
4+
on:
5+
push:
6+
branches: [master]
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
java: [ 17 ]
16+
experimental: [false]
17+
fail-fast: false
18+
continue-on-error: ${{ matrix.experimental }}
19+
name: Java ${{ matrix.Java }}
20+
steps:
21+
- uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 0
24+
- name: Set up java ${{ matrix.Java }}
25+
uses: actions/setup-java@v3
26+
with:
27+
java-version: ${{ matrix.Java }}
28+
distribution: 'adopt'
29+
cache: gradle
30+
- name: Grant execute permission for gradlew
31+
run: chmod +x gradlew
32+
- name: Compile with Gradle
33+
run: ./gradlew compileJava
34+
- name: Run tests
35+
run: ./gradlew test jacocoTestReport
36+
- name: Upload test results
37+
if: always()
38+
uses: actions/upload-artifact@v3
39+
with:
40+
name: test-results-${{ matrix.Java }}
41+
path: build/reports/tests
42+
- name: Version Name
43+
run: ./gradlew printVersion
44+
- name: Publish Snapshot
45+
env:
46+
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
47+
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
48+
if: ${{ env.ARTIFACTORY_USERNAME != '' }}
49+
continue-on-error: true
50+
run: ./gradlew publish
51+

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
2-
2+
[![Test](https://github.com/broadinstitute/barclay/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/broadinstitute/barclay/actions/workflows/tests.yml)
33

44
# Barclay
55
Barclay is a set of classes for annotating, parsing, validating, and generating documentation for command line options.

0 commit comments

Comments
 (0)