Skip to content

Commit 8376233

Browse files
committed
ci: added user api tests to workflow
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
1 parent 940a9a2 commit 8376233

File tree

4 files changed

+18
-15
lines changed

4 files changed

+18
-15
lines changed

.github/workflows/api-pr.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- "*"
77
paths:
8-
- 'apps/user/**' # Only trigger for changes in the apps/user directory
8+
- "apps/user/**" # Only trigger for changes in the apps/user directory
99

1010
jobs:
1111
test:
@@ -16,16 +16,16 @@ jobs:
1616
- name: Use Node.js 18.x
1717
uses: actions/setup-node@v3
1818
with:
19-
node-version: '18.x'
19+
node-version: "18.x"
2020

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

2424
- name: Build TypeScript project
25-
run: yarn workspace greenstand-wallet-app-api build
25+
run: yarn workspace user build
2626

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

3030
- name: Run tests
31-
run: yarn workspace greenstand-wallet-app-api test
31+
run: yarn workspace user test

.github/workflows/build-dev-docker-img-and-relase.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
name: Service CI/CD Pipeline to Release and Deploy to Dev Env
22

3-
43
on:
54
push:
65
branches:
76
- main
87
paths:
9-
- 'apps/user/**' # Only trigger for changes in the apps/user directory
8+
- "apps/user/**" # Only trigger for changes in the apps/user directory
109

1110
jobs:
1211
release:
@@ -20,10 +19,10 @@ jobs:
2019
- name: Use Node.js 20.x
2120
uses: actions/setup-node@v3
2221
with:
23-
node-version: '20.x'
22+
node-version: "20.x"
2423

2524
- name: Yarn Clean Install
26-
run: yarn workspace greenstand-wallet-app-api install
25+
run: yarn workspace user install
2726

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

3635
- name: Make Build
37-
run: yarn workspace greenstand-wallet-app-api build
36+
run: yarn workspace user build
3837

3938
- name: Get NPM Version
4039
id: package-version
@@ -54,12 +53,11 @@ jobs:
5453
username: ${{ secrets.DOCKERHUB_USERNAME }}
5554
password: ${{ secrets.DOCKERHUB_TOKEN }}
5655

57-
5856
- name: Build and Push Docker Image
5957
id: docker_build_release
6058
uses: docker/build-push-action@v5
6159
with:
62-
context: ./apps/user/
60+
context: ./apps/user/
6361
file: ./apps/user/Dockerfile
6462
push: true
6563
tags: greenstand/treetracker-wallet-monorepo-user-api:${{ steps.package-version.outputs.current-version }}

.github/workflows/github-ci.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,16 @@ jobs:
2626
with:
2727
runTests: false
2828

29+
- name: Jest unit tests 🧪
30+
run: yarn workspace user test:unit
31+
32+
- name: Jest integration tests 🧪
33+
run: yarn workspace user int-test
34+
2935
cypress-tests:
3036
name: Run cypress unit tests
3137
needs: install
3238
runs-on: ubuntu-latest
33-
3439
steps:
3540
- name: Checkout
3641
uses: actions/checkout@v4

apps/user/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "greenstand-wallet-app-api",
2+
"name": "user",
33
"version": "0.0.1",
44
"description": "",
55
"author": "",

0 commit comments

Comments
 (0)