-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Added GitHub actions to project. (#64)
Added "GitHub actions" that runs on each PR and merge request to master branch. Implementation of #63
- Loading branch information
1 parent
4c980a0
commit e81e29d
Showing
7 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: sonata-connect | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
env: | ||
GH_USERNAME: ${{ secrets.GH_USERNAME }} | ||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run tests | ||
run: bash run-tests.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM maven:3.9.2-amazoncorretto-20 | ||
|
||
WORKDIR sonata-connect | ||
|
||
COPY . . | ||
|
||
ENTRYPOINT mvn -s settings.xml install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '2.9' | ||
services: | ||
sonata-connect: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.test | ||
container_name: sonata-connect-tests-container | ||
environment: | ||
GITHUB_USERNAME: ${GH_USERNAME} | ||
ACCESS_TOKEN: ${ACCESS_TOKEN} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
source sonata-connect-build.test.sh | ||
|
||
source sonata-connect-run.test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
export IMAGE_NAME=sonata-connect-test | ||
|
||
echo "Starting building image with name: $IMAGE_NAME" | ||
|
||
docker image build -f Dockerfile.test -t $IMAGE_NAME . | ||
|
||
echo "Image $IMAGE_NAME has been successfully built" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
docker-compose -f docker-compose.test.yml up --abort-on-container-exit |