diff --git a/.github/workflows/api-pr.yml b/.github/workflows/api-pr.yml index c934c18..c3758b0 100644 --- a/.github/workflows/api-pr.yml +++ b/.github/workflows/api-pr.yml @@ -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: @@ -16,16 +16,16 @@ 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 + run: yarn workspace user test diff --git a/.github/workflows/build-dev-docker-img-and-relase.yml b/.github/workflows/build-dev-docker-img-and-relase.yml index 1cfcf38..6072bef 100644 --- a/.github/workflows/build-dev-docker-img-and-relase.yml +++ b/.github/workflows/build-dev-docker-img-and-relase.yml @@ -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: @@ -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} @@ -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 @@ -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 }} diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 9adb367..f2fb831 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -26,11 +26,16 @@ jobs: with: runTests: false + - name: Jest unit tests 🧪 + run: yarn workspace user test:unit + + - name: Jest integration tests 🧪 + run: yarn workspace user int-test + cypress-tests: name: Run cypress unit tests needs: install runs-on: ubuntu-latest - steps: - name: Checkout uses: actions/checkout@v4 diff --git a/apps/user/package.json b/apps/user/package.json index d3605bf..34a711b 100644 --- a/apps/user/package.json +++ b/apps/user/package.json @@ -1,5 +1,5 @@ { - "name": "greenstand-wallet-app-api", + "name": "user", "version": "0.0.1", "description": "", "author": "",