Skip to content

Commit

Permalink
move to testcontainer (#575)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanspiska authored Apr 2, 2024
1 parent 157ff1c commit b9c1412
Show file tree
Hide file tree
Showing 66 changed files with 444 additions and 7,148 deletions.
1,778 changes: 0 additions & 1,778 deletions .circleci/config.yml

This file was deleted.

36 changes: 5 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: build

on:
push:
branches:
- master
- develop
pull_request:
workflow_dispatch:

jobs:
Expand All @@ -23,34 +21,10 @@ jobs:
java-version: '17'
cache: 'maven'

- name: Build with Maven
run: mvn -B verify

- name: Setup Maven Central
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Spotless
run: mvn -B spotless:apply

- name: Publish to Maven Central
run: mvn -B deploy -P release -DskipTests
env:
OSSRH_USERNAME: ${{ secrets.S01_OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.S01_OSSRH_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Build with Maven
run: mvn -B verify

- name: 'Trigger ehrbase:next build'
if: github.ref == 'refs/heads/develop'
run: |
curl \
-X POST \
-H "Authorization: token ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
-H "Content-Type: application/json" \
https://api.github.com/repos/ehrbase/ehrbase/dispatches \
-d '{"event_type":"build-ehrbase-next"}'
56 changes: 56 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: publish

on:
push:
branches:
- master
- develop
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'

- name: Build with Maven
run: mvn -B verify

- name: Setup Maven Central
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE

- name: Publish to Maven Central
run: mvn -B deploy -P release -DskipTests
env:
OSSRH_USERNAME: ${{ secrets.S01_OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.S01_OSSRH_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: 'Trigger ehrbase:next build'
if: github.ref == 'refs/heads/develop'
run: |
curl \
-X POST \
-H "Authorization: token ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
-H "Content-Type: application/json" \
https://api.github.com/repos/ehrbase/ehrbase/dispatches \
-d '{"event_type":"build-ehrbase-next"}'
12 changes: 12 additions & 0 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,18 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.19.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.19.7</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
10 changes: 10 additions & 0 deletions client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
Expand Down
Loading

0 comments on commit b9c1412

Please sign in to comment.