-
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.
* ci: testing pipeline (#5) * ci: added testing pipeline workflow * ci: added worker service * ci: release pipeline (#7)
- Loading branch information
Showing
6 changed files
with
190 additions
and
3 deletions.
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,69 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
|
||
jobs: | ||
versioning: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.latest_version.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- id: latest_version | ||
name: Latest version | ||
run: python version.py >> $GITHUB_OUTPUT | ||
|
||
create-release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
needs: | ||
- versioning | ||
outputs: | ||
upload_url: ${{ steps.create-release.outputs.upload_url }} | ||
steps: | ||
- name: Create Release | ||
id: create-release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ needs.versioning.outputs.version }} | ||
release_name: Release ${{ needs.versioning.outputs.version }} | ||
draft: false | ||
prerelease: false | ||
|
||
build-release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
needs: | ||
- create-release | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.x' | ||
- name: Download dependencies | ||
run: flutter pub get | ||
- name: Create .env with server URL | ||
run: echo "API_LOGIN_URL = ${{ secrets.API_LOGIN_URL }}" > .env | ||
- name: Build apk | ||
run: flutter build apk --release | ||
- name: Upload Binary to Release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create-release.outputs.upload_url }} | ||
asset_path: ./build/app/outputs/flutter-apk/app-release.apk | ||
asset_name: android.apk | ||
asset_content_type: application/octet-stream |
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,48 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: ["dev"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.x' | ||
- name: Download dependencies | ||
run: flutter pub get | ||
- name: Create .env with server URL | ||
run: echo "API_LOGIN_URL = ${{ secrets.API_LOGIN_URL }}" > .env | ||
- name: Build apk | ||
run: flutter build apk | ||
- name: Build appbundle | ||
run: flutter build appbundle | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.x' | ||
- name: Download dependencies | ||
run: flutter pub get | ||
- name: Set up docker environment | ||
run: docker compose up -d | ||
- name: Create .env with server URL | ||
run: echo "API_LOGIN_URL = http://127.0.0.1:8080" > .env | ||
- name: Run tests | ||
run: flutter test | ||
- name: Clean docker environment | ||
run: docker compose down --rmi all -v --remove-orphans |
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,66 @@ | ||
version: '3.1' | ||
|
||
services: | ||
# proxy-python | ||
## TODO: Add proxy-python microservice | ||
# Gateway | ||
gateway: | ||
image: ghcr.io/hawks-atlanta/gateway-java:latest | ||
container_name: gateway | ||
restart: on-failure | ||
ports: | ||
- "127.0.0.1:8080:8080" | ||
environment: | ||
METADATA_BASEURL: http://metadata:8080 | ||
AUTHENTICATION_BASEURL: http://authentication:8080 | ||
# TODO: Worker | ||
# Microservices | ||
worker: | ||
image: ghcr.io/hawks-atlanta/worker-java:latest | ||
container_name: worker | ||
restart: on-failure | ||
ports: | ||
- "127.0.0.1:1900:1900" # RMI | ||
metadata: | ||
image: ghcr.io/hawks-atlanta/metadata-scala:latest | ||
container_name: metadata | ||
restart: on-failure | ||
ports: | ||
- "127.0.0.1:8082:8080" | ||
environment: | ||
DATABASE_HOST: "postgres-db" | ||
DATABASE_PORT: "5432" | ||
DATABASE_NAME: "database" | ||
DATABASE_USER: "username" | ||
DATABASE_PASSWORD: "password" | ||
authentication: | ||
image: ghcr.io/hawks-atlanta/authentication-go:latest | ||
container_name: authentication | ||
restart: on-failure | ||
ports: | ||
- "127.0.0.1:8083:8080" | ||
environment: | ||
DATABASE_ENGINE: postgres | ||
DATABASE_DSN: "host=postgres-db user=username password=password dbname=database port=5432 sslmode=disable" | ||
# Database | ||
postgres-db: | ||
image: postgres:latest | ||
container_name: postgres-db | ||
restart: on-failure | ||
ports: | ||
- "127.0.0.1:5432:5432" | ||
environment: | ||
- POSTGRES_USER=username | ||
- POSTGRES_PASSWORD=password | ||
- POSTGRES_DB=database | ||
|
||
postgres-admin: | ||
image: dpage/pgadmin4 | ||
container_name: postgres-admin | ||
ports: | ||
- "127.0.0.1:5050:80" | ||
environment: | ||
- [email protected] | ||
- PGADMIN_DEFAULT_PASSWORD=postgres | ||
depends_on: | ||
- postgres-db |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,5 +3,5 @@ | |
"git-semver-tags": "^4.1.1", | ||
"standard-version": "^9.5.0" | ||
}, | ||
"version": "0.0.4" | ||
"version": "0.0.6" | ||
} |