diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 533b074..51f84bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,6 +132,33 @@ jobs: - name: Build Affected run: npx nx affected -t build build-storybook --parallel=3 + e2e: + name: E2E Affected + needs: [build] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: nrwl/nx-set-shas@v3 + - uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + + - name: Cache NPM Dependencies + uses: actions/cache@v4 + with: + path: | + node_modules + ~/.cache + dist + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + + - name: E2E Affected + run: npx nx affected --target=e2e --parallel=3 + # publish-storybook: # name: Publish Storybook # needs: [build, lint] @@ -161,7 +188,7 @@ jobs: deploy-front-end: name: Deploy Front-End - needs: [build, lint] + needs: [e2e, build, lint] runs-on: ubuntu-latest steps: @@ -203,7 +230,7 @@ jobs: deploy-server: name: Deploy Server - needs: [build, lint] + needs: [e2e, build, lint] runs-on: ubuntu-latest steps: @@ -239,33 +266,3 @@ jobs: - name: Deploy Prod Server if: ${{ env.is-main-branch == 'true' }} run: npx nx affected --target=deploy --exclude='*,!tag:backend' --configuration=production - -# release: -# name: Release Affected -# needs: [build, lint] -# runs-on: ubuntu-latest -# -# steps: -# - uses: actions/checkout@v4 -# with: -# # We need to fetch all branches and commits so that Nx affected has a base to compare against. -# fetch-depth: 0 -# # Derive appropriate SHAs for base and head for `nx affected` commands -# - uses: nrwl/nx-set-shas@v3 -# - uses: actions/setup-node@v4 -# with: -# node-version: 20 -# cache: 'npm' -# -# - name: Cache NPM Dependencies -# uses: actions/cache@v4 -# with: -# path: | -# node_modules -# ~/.cache -# dist -# key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} -# -# - name: Release Affected -## if: ${{ env.is-main-branch == 'true' }} -# run: npx nx affected -t nx-release-publish --parallel=3