Skip to content

Commit

Permalink
ci: added user api tests to workflow
Browse files Browse the repository at this point in the history
ci: added user api tests to workflow

ci: added user api tests to workflow

dded user api tests to workflowwith '#' will be ignored, and an empty message aborts the commit.

ci: added user api tests to workflow
  • Loading branch information
dorukucak committed Dec 24, 2024
1 parent 940a9a2 commit 12558a2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/api-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- "*"
paths:
- 'apps/user/**' # Only trigger for changes in the apps/user directory
- "apps/user/**" # Only trigger for changes in the apps/user directory

jobs:
test:
Expand All @@ -16,16 +16,19 @@ jobs:
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: '18.x'
node-version: "18.x"

- name: Install dependencies for specific package
run: yarn workspace greenstand-wallet-app-api install
run: yarn workspace user install

- name: Build TypeScript project
run: yarn workspace greenstand-wallet-app-api build
run: yarn workspace user build

- name: Lint code with ESLint
run: yarn workspace greenstand-wallet-app-api lint
run: yarn workspace user lint

- name: Run tests
run: yarn workspace greenstand-wallet-app-api test
- name: Run unit tests
run: yarn workspace user test:unit

- name: Run integration tests
run: yarn workspace user int-test
12 changes: 5 additions & 7 deletions .github/workflows/build-dev-docker-img-and-relase.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: Service CI/CD Pipeline to Release and Deploy to Dev Env


on:
push:
branches:
- main
paths:
- 'apps/user/**' # Only trigger for changes in the apps/user directory
- "apps/user/**" # Only trigger for changes in the apps/user directory

jobs:
release:
Expand All @@ -20,10 +19,10 @@ jobs:
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: '20.x'
node-version: "20.x"

- name: Yarn Clean Install
run: yarn workspace greenstand-wallet-app-api install
run: yarn workspace user install

- name: Install Semantic Release
run: yarn global add semantic-release @semantic-release/{git,exec,changelog}
Expand All @@ -34,7 +33,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Make Build
run: yarn workspace greenstand-wallet-app-api build
run: yarn workspace user build

- name: Get NPM Version
id: package-version
Expand All @@ -54,12 +53,11 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}


- name: Build and Push Docker Image
id: docker_build_release
uses: docker/build-push-action@v5
with:
context: ./apps/user/
context: ./apps/user/
file: ./apps/user/Dockerfile
push: true
tags: greenstand/treetracker-wallet-monorepo-user-api:${{ steps.package-version.outputs.current-version }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
name: Run cypress unit tests
needs: install
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion apps/user/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "greenstand-wallet-app-api",
"name": "user",
"version": "0.0.1",
"description": "",
"author": "",
Expand Down

0 comments on commit 12558a2

Please sign in to comment.