Skip to content

Commit

Permalink
First public commit
Browse files Browse the repository at this point in the history
  • Loading branch information
margon8 committed May 25, 2023
1 parent e4518a9 commit 26db44c
Show file tree
Hide file tree
Showing 170 changed files with 11,033 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tmp
.git
.buildkite
.bsp
112 changes: 112 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Deploy CI

on:
push:
branches:
- main
release:
types: published

jobs:
assembly:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'

- name: Build artifact
run: sbt assembly

- name: Upload output jar
uses: actions/upload-artifact@v2
with:
name: jar
path: target/scala-2.12/metabolic-core-assembly-SNAPSHOT.jar

- name: Upload output entrypoint
uses: actions/upload-artifact@v2
with:
name: em_entrypoint
path: src/main/scala/MapperEntrypoint.scala

deploy-latest:
needs: assembly
if: ${{ github.ref == 'refs/heads/main' }}

runs-on: ubuntu-latest
steps:
- name: Download em_entrypoint
uses: actions/download-artifact@v2
with:
name: em_entrypoint

- name: Upload EM Entrypoint file to S3
uses: qoqa/[email protected]
env:
AWS_S3_BUCKET: ${{ secrets.AWS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-central-1'
AWS_S3_PATH: '/platform/core/latest/MapperEntrypoint.scala'
FILE: 'MapperEntrypoint.scala'

- name: Download jar
uses: actions/download-artifact@v2
with:
name: jar

- name: Upload jar artifact file to S3
uses: qoqa/[email protected]
env:
AWS_S3_BUCKET: ${{ secrets.AWS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-central-1'
AWS_S3_PATH: '/platform/core/latest/metabolic-core-assembly.jar'
FILE: 'metabolic-core-assembly-SNAPSHOT.jar'

deploy-release:
needs: assembly
if: ${{ startsWith(github.ref, 'refs/tags/') }}

runs-on: ubuntu-latest
steps:
- name: Git branch name
uses: EthanSK/git-branch-name-action@v1

- name: Download em_entrypoint
uses: actions/download-artifact@v2
with:
name: em_entrypoint

- name: Upload EM Entrypoint file to S3
uses: qoqa/[email protected]
env:
AWS_S3_BUCKET: ${{ secrets.AWS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-central-1'
AWS_S3_PATH: ${{ format('/platform/core/{0}/MapperEntrypoint.scala', env.GIT_BRANCH_NAME) }}
FILE: 'MapperEntrypoint.scala'

- name: Download jar
uses: actions/download-artifact@v2
with:
name: jar

- name: Upload jar artifact file to S3
uses: qoqa/[email protected]
env:
AWS_S3_BUCKET: ${{ secrets.AWS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-central-1'
AWS_S3_PATH: ${{ format('/platform/core/{0}/metabolic-core-assembly.jar', env.GIT_BRANCH_NAME) }}
FILE: 'metabolic-core-assembly-SNAPSHOT.jar'

22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Scala CI

on:
push:
branches:
- feature/*
- hotfix/*

jobs:
test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Run tests
run: sbt test
Loading

0 comments on commit 26db44c

Please sign in to comment.