Skip to content

Commit

Permalink
Switch from Travis CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrueden committed Jul 1, 2021
1 parent cc62e8f commit f1149be
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .travis/build.sh → .github/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/travis-build.sh
sh travis-build.sh
curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/ci-build.sh
sh ci-build.sh
3 changes: 3 additions & 0 deletions .github/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/ci-setup-github-actions.sh
sh ci-setup-github-actions.sh
42 changes: 42 additions & 0 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: build

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Cache m2 folder
uses: actions/cache@v2
env:
cache-name: cache-m2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'zulu'
- name: Set up CI environment
run: .github/setup.sh
- name: Execute the build
run: .github/build.sh
env:
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
OSSRH_PASS: ${{ secrets.OSSRH_PASS }}
SIGNING_ASC: ${{ secrets.SIGNING_ASC }}
35 changes: 35 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: build PR

on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Cache m2 folder
uses: actions/cache@v2
env:
cache-name: cache-m2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'zulu'
- name: Set up CI environment
run: .github/setup.sh
- name: Execute the build
run: .github/build.sh
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[![](https://github.com/imglib/imglib-tests/actions/workflows/build-main.yml/badge.svg)](https://github.com/imglib/imglib-tests/actions/workflows/build-main.yml)

10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>net.imglib2</groupId>
<artifactId>pom-imglib2</artifactId>
<version>12.0.0</version>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>28.0.0</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -69,8 +69,8 @@ Jean-Yves Tinevez and Michael Zinsmaier.</license.copyrightOwners>
<url>https://github.com/imglib/imglib-tests/issues</url>
</issueManagement>
<ciManagement>
<system>Travis CI</system>
<url>https://travis-ci.org/imglib/imglib2-tests</url>
<system>GitHub Actions</system>
<url>https://github.com/imglib/imglib-tests/actions</url>
</ciManagement>

<repositories>
Expand Down

0 comments on commit f1149be

Please sign in to comment.