Skip to content

Commit

Permalink
Fixed #114 - Replacing .travis with GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
khmarbaise committed May 31, 2020
1 parent 3798c4e commit 4872217
Show file tree
Hide file tree
Showing 6 changed files with 193 additions and 34 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
name: SitePublishing

on:
push:
branches:
- master

jobs:
update-site:
name: Linux
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-ubuntu-latest-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-ubuntu-latest
- name: 'Setup Java Version'
uses: actions/setup-java@v1
with:
java-version: 11
- name: 'Build'
run: mvn -V --no-transfer-progress clean verify site:site site:stage
- name: 'Deploy to gh-pages'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: target/staging
TARGET_FOLDER: snapshot
45 changes: 45 additions & 0 deletions .github/workflows/jdkbuilds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
name: JDKBuilds

on:
push:
branches:
- master
- '*'
pull_request:
branches:
- '*'

jobs:
openjdk:
strategy:
matrix:
jdk: [jdk-8-slim, jdk-11-slim, jdk-13, jdk-14]
name: "OpenJDK ${{ matrix.jdk }}"
runs-on: ubuntu-latest
container: "maven:3.6.3-${{ matrix.jdk }}"
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ matrix.jdk }}-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-${{ matrix.jdk }}
- name: 'Build'
run: mvn -V --no-transfer-progress clean verify --fail-at-end
74 changes: 74 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
name: Main
on:
push:
branches:
- master
- '*'
pull_request:
branches:
- '*'

jobs:
linux:
name: Linux
runs-on: ubuntu-latest
container: "maven:3.6.3-jdk-8-slim"
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-ubuntu-latest-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-ubuntu-latest
- name: 'Build'
run: mvn -V --no-transfer-progress clean verify --fail-at-end
windows:
name: 'Windows'
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-windows-latest-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-windows-latest
- name: 'Set up JDK 8'
uses: actions/setup-java@v1
with:
java-version: 8
- name: 'Build'
shell: bash
run: mvn -V --no-transfer-progress clean verify --fail-at-end
mac:
name: 'Mac OS'
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-macos-latest-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-macos-latest
- name: 'Set up JDK 8'
uses: actions/setup-java@v1
with:
java-version: 8
- name: 'Build'
run: mvn -V --no-transfer-progress clean verify --fail-at-end
25 changes: 25 additions & 0 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Trigger the workflow on milestone events
on:
milestone:
types: [closed]
name: Generate Release Notes and Publish
jobs:
create-release-notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: create release notes from milestone ${{ github.event.milestone.title }}
uses: docker://decathlon/release-notes-generator-action:2.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OUTPUT_FOLDER: temp_release_notes
- name: deploy release notes for milestone ${{ github.event.milestone.title }}
uses: ncipollo/release-action@v1
with:
replacesArtifacts: false
allowUpdates: true
bodyFile: temp_release_notes/release_file.md
draft: false
tag: ${{ github.event.milestone.title }}
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

12 changes: 0 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -575,18 +575,6 @@
</reporting>

<profiles>
<profile>
<!--
On travis-ci, the API rate limit for github reports is sometimes exceeded,
so only render this when not run on travis.
-->
<id>mojo-enable-githubreport-when-not-on-travis</id>
<activation>
<property>
<name>!env.CONTINUOUS_INTEGRATION</name>
</property>
</activation>
</profile>
<profile>
<id>mojo-release</id>
<build>
Expand Down

0 comments on commit 4872217

Please sign in to comment.