-
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.
- Loading branch information
1 parent
8d865b1
commit 7f178bd
Showing
16 changed files
with
8,045 additions
and
48 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,107 @@ | ||
name: Build, Test and Push Docker Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
# run-tests: | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v4 | ||
|
||
# - name: Set up Node.js | ||
# uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: '21' | ||
|
||
# - name: Test appointment service | ||
# run: | | ||
# cd services/appointment | ||
# yarn install --frozen-lockfile | ||
# yarn test | ||
|
||
# - name: Test user service | ||
# run: | | ||
# cd services/user | ||
# yarn install --frozen-lockfile | ||
# yarn test | ||
|
||
# - name: Test auth service | ||
# run: | | ||
# cd services/auth | ||
# yarn install --frozen-lockfile | ||
# yarn test | ||
|
||
# - name: Test email service | ||
# run: | | ||
# cd services/email | ||
# yarn install --frozen-lockfile | ||
# yarn test | ||
|
||
build-and-push: | ||
# needs: run-tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Qemu | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push api-gateway | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./api-gateway | ||
file: ./api-gateway/Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ secrets.DOCKER_USERNAME }}/api-gateway:latest | ||
|
||
- name: Build and push appointment service | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./services/appointment | ||
file: ./services/appointment/Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ secrets.DOCKER_USERNAME }}/appointment:latest | ||
|
||
- name: Build and push user service | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./services/user | ||
file: ./services/user/Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ secrets.DOCKER_USERNAME }}/user:latest | ||
|
||
- name: Build and push auth service | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./services/auth | ||
file: ./services/auth/Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ secrets.DOCKER_USERNAME }}/auth:latest | ||
|
||
- name: Build and push email service | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./services/email | ||
file: ./services/email/Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ secrets.DOCKER_USERNAME }}/email:latest |
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,14 @@ | ||
import type { Config } from '@jest/types'; | ||
|
||
const config: Config.InitialOptions = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
testMatch: ['**/*.test.ts'], | ||
verbose: true, | ||
forceExit: true, | ||
clearMocks: true, | ||
resetMocks: true, | ||
restoreMocks: true, | ||
}; | ||
|
||
export default config; |
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
Empty file.
Oops, something went wrong.