Skip to content

Commit

Permalink
chore: v0.0.6 (#8)
Browse files Browse the repository at this point in the history
* ci: testing pipeline (#5)

* ci: added testing pipeline workflow

* ci: added worker service

* ci: release pipeline (#7)
  • Loading branch information
shoriwe authored Aug 30, 2023
1 parent 178581c commit de6fb7b
Show file tree
Hide file tree
Showing 6 changed files with 190 additions and 3 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/release.yaml
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
48 changes: 48 additions & 0 deletions .github/workflows/testing.yaml
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### 0.0.6 (2023-08-30)

### 0.0.5 (2023-08-30)

### 0.0.4 (2023-08-30)

### 0.0.3 (2023-08-30)
Expand Down
66 changes: 66 additions & 0 deletions docker-compose.yaml
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
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"git-semver-tags": "^4.1.1",
"standard-version": "^9.5.0"
},
"version": "0.0.4"
"version": "0.0.6"
}

0 comments on commit de6fb7b

Please sign in to comment.