diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 129a6ed3..6cf822a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,16 +20,16 @@ jobs: - uses: pnpm/action-setup@v2 with: - version: 8 + version: 8.15.1 # Connect your workspace on nx.app and uncomment this to enable task distribution. # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested # - run: pnpm exec nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" # Cache node_modules - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: 'pnpm' - run: pnpm install --frozen-lockfile - uses: nrwl/nx-set-shas@v4 diff --git a/.github/workflows/lint-test-build.yml b/.github/workflows/lint-test-build.yml new file mode 100644 index 00000000..ed2d3dfc --- /dev/null +++ b/.github/workflows/lint-test-build.yml @@ -0,0 +1,90 @@ +name: Lint Test Build +on: + push: + branches: + - develop + pull_request: + branches: + - develop + +jobs: + install-deps: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: pnpm/action-setup@v2 + with: + version: 8.15.1 + + # Connect your workspace on nx.app and uncomment this to enable task distribution. + # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested + - run: pnpm exec nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" + + # Cache node_modules + - uses: actions/setup-node@v4 + with: + node-version: 22.x + cache: 'pnpm' + + - name: PNPM install based on lockfile + run: pnpm install --frozen-lockfile + + lint: + runs-on: ubuntu-latest + needs: install-deps + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - run: git fetch --no-tags --prune --depth=1 origin develop + + - name: Cache node modules + uses: actions/cache@v4 + with: + path: node_modules + key: cache-node-modules-${{ hashFiles('pnpm-lock.json') }} + + - run: npx nx affected --target=lint --parallel=3 --base=origin/develop + + test: + runs-on: ubuntu-latest + needs: install-deps + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - run: git fetch --no-tags --prune --depth=1 origin develop + + - name: Cache node modules + uses: actions/cache@v4 + with: + path: node_modules + key: cache-node-modules-${{ hashFiles('pnpm-lock.json') }} + + - run: npx nx affected --target=test --parallel=3 --configuration=ci --base=origin/develop + + build: + runs-on: ubuntu-latest + needs: install-deps + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - run: git fetch --no-tags --prune --depth=1 origin develop + + - name: Cache node modules + uses: actions/cache@v4 + with: + path: node_modules + key: cache-node-modules-${{ hashFiles('pnpm-lock.json') }} + + - run: npx nx affected --target=build --parallel=3 --configuration=ci --base=origin/develop diff --git a/.github/workflows/workflows/ci.yml b/.github/workflows/workflows/ci.yml deleted file mode 100644 index d9800521..00000000 --- a/.github/workflows/workflows/ci.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: CI - -on: - push: - branches: - - main - pull_request: - -permissions: - actions: read - contents: read - -jobs: - main: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - # Connect your workspace on nx.app and uncomment this to enable task distribution. - # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested - # - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" - - # Cache node_modules - - uses: actions/setup-node@v3 - with: - node-version: 20 - cache: 'npm' - - run: npm ci - - uses: nrwl/nx-set-shas@v4 - - - run: git branch --track main origin/main - if: ${{ github.event_name == 'pull_request' }} - - - run: npx nx-cloud record -- nx format:check - - run: npx nx affected -t lint test build e2e-ci diff --git a/.idea/dbnavigator.xml b/.idea/dbnavigator.xml index 2151784d..d1fdb770 100644 --- a/.idea/dbnavigator.xml +++ b/.idea/dbnavigator.xml @@ -397,4 +397,4 @@ - + \ No newline at end of file diff --git a/.idea/material_theme_project_new.xml b/.idea/material_theme_project_new.xml index 356d3d9a..f1f4d3d8 100644 --- a/.idea/material_theme_project_new.xml +++ b/.idea/material_theme_project_new.xml @@ -9,4 +9,4 @@ - + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 7ddfc9ed..883037ff 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -6,7 +6,4 @@ - - - \ No newline at end of file diff --git a/nx.json b/nx.json index c4e46f3d..285aef04 100644 --- a/nx.json +++ b/nx.json @@ -72,6 +72,5 @@ "style": "scss", "unitTestRunner": "jest" } - }, - "nxCloudAccessToken": "NjQ2N2JlZmEtMDI5Yi00NThkLTgyOGEtNmNlM2UxNWI3ODM3fHJlYWQtd3JpdGU=" + } }