Skip to content

Commit

Permalink
Add actions (#853)
Browse files Browse the repository at this point in the history
* create first action (build on push)

* simplify gradle caches

* reorder steps + remove travis and azure pipelines

* update workflow and readme

* rename workflow

* add nightly upload of snapshot for test deployment
  • Loading branch information
cbellone authored and syjer committed Dec 22, 2019
1 parent 885d88d commit b359ba4
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 65 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build-on-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: build

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
postgresql: ['9.6','10','11','12']
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v1
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
restore-keys: |
${{ runner.os }}-gradlew-
- uses: harmon758/postgresql-action@v1
with:
postgresql version: ${{ matrix.postgresql }}
postgresql db: 'alfio'
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Gradle
run: ./gradlew build jacocoTestReport -Dspring.profiles.active=travis -Ddbenv=PGSQL-TRAVIS -Dpgsql${{ matrix.postgresql }}
- name: upload-to-coveralls
if: matrix.postgresql == '12' # run only once
run: ./gradlew coveralls
37 changes: 37 additions & 0 deletions .github/workflows/upload-artifact-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: upload-test
on:
schedule:
- cron: '55 23 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v1
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
restore-keys: |
${{ runner.os }}-gradlew-
- uses: harmon758/postgresql-action@v1
with:
postgresql db: 'alfio'
- name: install-s3cmd
run: sudo pip install s3cmd
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Gradle
run: ./gradlew build -Dspring.profiles.active=travis -Ddbenv=PGSQL-TRAVIS
- name: Upload artifact
run: s3cmd $S3_OPTIONS build/libs/alfio-*-boot.war $ARTIFACT_URI
env:
S3_OPTIONS: ${{ secrets.S3_OPTIONS }}
ARTIFACT_URI: ${{ secrets.S3_ARTIFACT_URI }}
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ The open source ticket reservation system.

[Alf.io](https://alf.io) is a free and open source event attendance management system, developed for event organizers who care about privacy, security and fair pricing policy for their customers.

[![Financial Contributors on Open Collective](https://opencollective.com/alfio/all/badge.svg?label=financial+contributors)](https://opencollective.com/alfio) [![Build Status](http://img.shields.io/travis/alfio-event/alf.io/master.svg)](https://travis-ci.org/alfio-event/alf.io) [![Coverage Status](https://img.shields.io/coveralls/alfio-event/alf.io.svg)](https://coveralls.io/r/alfio-event/alf.io)
[![Build Status](https://github.com/alfio-event/alf.io/workflows/build/badge.svg)](https://github.com/alfio-event/alf.io/actions)
[![Coverage Status](https://img.shields.io/coveralls/alfio-event/alf.io.svg)](https://coveralls.io/r/alfio-event/alf.io)
[![Financial Contributors on Open Collective](https://opencollective.com/alfio/all/badge.svg?label=financial+contributors)](https://opencollective.com/alfio)
[![Docker Hub Pulls](https://img.shields.io/docker/pulls/alfio/alf.io.svg)](https://hub.docker.com/r/alfio/alf.io/tags)
[![Open Source Helpers](https://www.codetriage.com/exteso/alf.io/badges/users.svg)](https://www.codetriage.com/exteso/alf.io)

Expand Down Expand Up @@ -175,5 +177,6 @@ Become a financial contributor and help us sustain our community. [[Contribute](
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/alfio/contribute)]

<a href="https://opencollective.com/alfio/organization/0/website"><img src="https://opencollective.com/alfio/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/alfio/organization/0/website"><img src="https://opencollective.com/alfio/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/alfio/organization/2/website"><img src="https://opencollective.com/alfio/organization/2/avatar.svg"></a>

20 changes: 0 additions & 20 deletions azure-pipelines.yml

This file was deleted.

0 comments on commit b359ba4

Please sign in to comment.