Skip to content

Commit

Permalink
Merge pull request #2 from abanoub-fathy/add-scripts
Browse files Browse the repository at this point in the history
add test:ci script in auth service
  • Loading branch information
abanoub-fathy committed Apr 8, 2024
2 parents 9f30193 + 7d64f31 commit 97439c0
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 16 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/auth-service-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: auth-service-deployment

on:
push:
branches: main
paths:
- "auth/**"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- run: cd auth && docker build -t $DOCKER_USER_NAME/auth .
- run: docker login -u $DOCKER_USER_NAME -p $DOCKER_PASSWORD
- run: docker push $DOCKER_USER_NAME/auth

env:
DOCKER_USER_NAME: ${{ secrets.DOCKER_USER_NAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
14 changes: 14 additions & 0 deletions .github/workflows/auth-service-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: auth-service-testing

on:
pull_request:
paths:
- "auth/**"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- run: cd auth && npm install && npm run test:ci
14 changes: 14 additions & 0 deletions .github/workflows/orders-service-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: orders-service-testing

on:
pull_request:
paths:
- "orders/**"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- run: cd orders && npm install && npm run test:ci
14 changes: 14 additions & 0 deletions .github/workflows/payments-service-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: payments-service-testing

on:
pull_request:
paths:
- "payments/**"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- run: cd payments && npm install && npm run test:ci
12 changes: 0 additions & 12 deletions .github/workflows/testing.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/tickets-service-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: tickets-service-testing

on:
pull_request:
paths:
- "tickets/**"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- run: cd tickets && npm install && npm run test:ci
3 changes: 2 additions & 1 deletion auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"description": "",
"main": "index.js",
"scripts": {
"start": "nodemon src/index.ts",
"test": "jest --watchAll --no-cache",
"start": "nodemon src/index.ts"
"test:ci": "jest"
},
"jest": {
"preset": "ts-jest",
Expand Down
3 changes: 2 additions & 1 deletion orders/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"description": "",
"main": "index.js",
"scripts": {
"start": "nodemon src/index.ts",
"test": "jest --watchAll --no-cache",
"start": "nodemon src/index.ts"
"test:ci": "jest"
},
"jest": {
"preset": "ts-jest",
Expand Down
3 changes: 2 additions & 1 deletion payments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"description": "",
"main": "index.js",
"scripts": {
"start": "nodemon src/index.ts",
"test": "jest --watchAll --no-cache",
"start": "nodemon src/index.ts"
"test:ci": "jest"
},
"jest": {
"preset": "ts-jest",
Expand Down
3 changes: 2 additions & 1 deletion tickets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"description": "",
"main": "index.js",
"scripts": {
"start": "nodemon src/index.ts",
"test": "jest --watchAll --no-cache",
"start": "nodemon src/index.ts"
"test:ci": "jest"
},
"jest": {
"preset": "ts-jest",
Expand Down

0 comments on commit 97439c0

Please sign in to comment.