From 6e2af40ec67aa1c87649d9ee5f95f9ad21351236 Mon Sep 17 00:00:00 2001 From: David Schmidt <66205241+KonsumGandalf@users.noreply.github.com> Date: Fri, 26 Apr 2024 21:35:20 +0200 Subject: [PATCH] Revert "feat: Add GitHub Pipelines (#10)" --- .github/workflows/ci.yml | 6 +- .github/workflows/lint-test-build.yml | 90 --------------------------- .github/workflows/workflows/ci.yml | 37 +++++++++++ .idea/dbnavigator.xml | 2 +- .idea/material_theme_project_new.xml | 2 +- .idea/vcs.xml | 3 + nx.json | 3 +- 7 files changed, 47 insertions(+), 96 deletions(-) delete mode 100644 .github/workflows/lint-test-build.yml create mode 100644 .github/workflows/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cf822a0..129a6ed3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,16 +20,16 @@ jobs: - uses: pnpm/action-setup@v2 with: - version: 8.15.1 + version: 8 # 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 + - uses: actions/setup-node@v3 with: - node-version: 22 + node-version: 20 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 deleted file mode 100644 index ed2d3dfc..00000000 --- a/.github/workflows/lint-test-build.yml +++ /dev/null @@ -1,90 +0,0 @@ -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 new file mode 100644 index 00000000..d9800521 --- /dev/null +++ b/.github/workflows/workflows/ci.yml @@ -0,0 +1,37 @@ +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 d1fdb770..2151784d 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 f1f4d3d8..356d3d9a 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 883037ff..7ddfc9ed 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -6,4 +6,7 @@ + + + \ No newline at end of file diff --git a/nx.json b/nx.json index 285aef04..c4e46f3d 100644 --- a/nx.json +++ b/nx.json @@ -72,5 +72,6 @@ "style": "scss", "unitTestRunner": "jest" } - } + }, + "nxCloudAccessToken": "NjQ2N2JlZmEtMDI5Yi00NThkLTgyOGEtNmNlM2UxNWI3ODM3fHJlYWQtd3JpdGU=" }