Skip to content

Commit

Permalink
migrate to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
javfg committed Jul 24, 2024
1 parent 241c60e commit b1207ae
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 27 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build

on:
release:
types:
- published
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: write

env:
TAG: ${{ github.ref_name }}
SCALA_VERSION: 2.12.12
OUTPUT_PATH: target/scala-2.12

steps:
- id: prepare-tag
name: Prepare tag
run: echo "TAG=$(echo $TAG | sed 's/^v//')" >> $GITHUB_ENV

- id: checkout
name: Check out repo
uses: actions/checkout@v4

- id: scala-setup
name: Install Scala
uses: olafurpg/setup-scala@v11
with:
java-version: [email protected]

- id: cache
name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/coursier
~/.ivy2/cache
~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}

- id: linter
name: Lint code
run: sbt ++${{ env.SCALA_VERSION }} scalafmtCheckAll

- id: compile
name: Compile code
run: sbt ++${{ env.SCALA_VERSION }} clean compile

- id: test
name: Run tests
run: sbt ++${{ env.SCALA_VERSION }} coverage test coverageReport

- id: assembly
name: Build jar
run: sbt ++${{env.SCALA_VERSION }} 'set test in assembly := {}' assembly

- id: rename
name: Rename jar
run: mv ${{ env.OUTPUT_PATH }}/etl-backend-*.jar ${{ env.OUTPUT_PATH }}/etl-backend-${{ env.TAG }}.jar

- id: push-to-release
uses: svenstaro/upload-release-action@v2
with:
file: ${{ env.OUTPUT_PATH }}/etl-backend-${{ env.TAG }}.jar
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.com/opentargets/platform-etl-backend.svg?branch=master)](https://travis-ci.com/opentargets/platform-etl-backend)
![Build status](https://github.com/opentargets/platform-etl-backend/actions/workflows/build.yaml/badge.svg)

# Open Targets Post-Pipeline ETL process

Expand Down

0 comments on commit b1207ae

Please sign in to comment.