From 150c70f910d7fffb9ac37bf00c70dd63b2f4b6f3 Mon Sep 17 00:00:00 2001 From: AdityaPat_ <126982848+AdityaP700@users.noreply.github.com> Date: Thu, 23 Jan 2025 15:05:49 +0530 Subject: [PATCH 01/13] fix: skip unnecessary test runs for bot-generated and non-critical PRs --- .../pr-testing-with-test-project.yml | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-testing-with-test-project.yml b/.github/workflows/pr-testing-with-test-project.yml index 7c543f907..f22df3bb4 100644 --- a/.github/workflows/pr-testing-with-test-project.yml +++ b/.github/workflows/pr-testing-with-test-project.yml @@ -7,7 +7,26 @@ on: jobs: test: - if: github.event.pull_request.draft == false + if: > + github.event.pull_request.draft == false && + !( + (github.actor == 'asyncapi-bot' && ( + startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') || + startsWith(github.event.pull_request.title, 'chore(release):') + )) || + (github.actor == 'asyncapi-bot-eve' && ( + startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') || + startsWith(github.event.pull_request.title, 'chore(release):') + )) || + (github.actor == 'allcontributors[bot]' && + startsWith(github.event.pull_request.title, 'docs: add') + ) || + (github.event.pull_request.files.*.path == 'README.md') || + (github.event.pull_request.files.*.path == 'docs/**') || + (github.event.pull_request.files.*.path == '.github/**') || + (github.event.pull_request.files.*.path == 'CONTRIBUTING.md') || + (github.event.pull_request.files.*.path == 'Development.md') + ) name: Test generator as dependency with Node ${{ matrix.node }} runs-on: ubuntu-latest strategy: From fbe5518557e699c7ae4ae738eade1623bd5cb5cf Mon Sep 17 00:00:00 2001 From: AdityaP700 <126982848+AdityaP700@users.noreply.github.com> Date: Thu, 23 Jan 2025 15:38:49 +0530 Subject: [PATCH 02/13] chore: update README.md for testing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 346b6a84c..1021adc4b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This is a Monorepo managed using [Turborepo](https://turbo.build/) and contains 1. [Hooks](apps/hooks): This library contains generator filters that can be reused across multiple templates, helping to avoid redundant work. Hooks are designed to let template developers hook into the template generation process. For example, one can create a hook code that will be automatically invoked right after the template generation process has ended. -1. [Nunjucks-filters](apps/nunjucks-filters): This library contains generator filters that can be reused across multiple templates, helping to avoid redundant work. These filters are designed specifically for Nunjucks templates and are included by default with the generator, so there's no need to add them to dependencies separately. +1. [Nunjucks-filters](apps/nunjucks-filters): This library contains generator filters that can be reused across multiple templates helping to avoid redundant work. The filters are designed specifically for Nunjucks templates and are included by default with the generator, so there's no need to add them to dependencies separately. > [!IMPORTANT] > **Deprecation Notice:** The Nunjucks renderer engine is deprecated and will be removed in future releases. We strongly recommend using the React renderer engine instead. You can find how to migrate from Nunjucks to React in the [migration guide](apps/generator/docs/nunjucks-depreciate.md) From ae3ed1c48a5415a514de774320f477a7886cd2b0 Mon Sep 17 00:00:00 2001 From: AdityaPat_ <126982848+AdityaP700@users.noreply.github.com> Date: Thu, 23 Jan 2025 15:57:47 +0530 Subject: [PATCH 03/13] Update pr-testing-with-test-project.yml --- .github/workflows/pr-testing-with-test-project.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pr-testing-with-test-project.yml b/.github/workflows/pr-testing-with-test-project.yml index f22df3bb4..1d3e5a3db 100644 --- a/.github/workflows/pr-testing-with-test-project.yml +++ b/.github/workflows/pr-testing-with-test-project.yml @@ -33,6 +33,10 @@ jobs: matrix: node: ["18", "20"] steps: + - name: Debug modified files + run: | + echo "Modified files:" + echo "${{ toJson(github.event.pull_request.files.*.path) }}" - name: Checkout repository uses: actions/checkout@v3 - name: Run test From 4a5a8761694a234540e9a84fd44c7d09c0a815c6 Mon Sep 17 00:00:00 2001 From: AdityaPat_ <126982848+AdityaP700@users.noreply.github.com> Date: Thu, 23 Jan 2025 16:02:18 +0530 Subject: [PATCH 04/13] Update pr-testing-with-test-project.yml --- .../pr-testing-with-test-project.yml | 35 +++++++++++++------ 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr-testing-with-test-project.yml b/.github/workflows/pr-testing-with-test-project.yml index 1d3e5a3db..3935df0c2 100644 --- a/.github/workflows/pr-testing-with-test-project.yml +++ b/.github/workflows/pr-testing-with-test-project.yml @@ -6,9 +6,33 @@ on: types: [opened, reopened, synchronize, ready_for_review] jobs: + check-files: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.check.outputs.should_skip }} + steps: + - name: Check for skippable files + id: check + env: + PR_FILES: ${{ toJson(github.event.pull_request.files.*.path) }} + run: | + SKIPPABLE_FILES=('README.md' 'docs/**' '.github/**' 'CONTRIBUTING.md' 'Development.md') + SKIP=false + + for file in "${SKIPPABLE_FILES[@]}"; do + if echo "$PR_FILES" | grep -q "$file"; then + SKIP=true + break + fi + done + + echo "should_skip=$SKIP" >> $GITHUB_OUTPUT + test: + needs: check-files if: > github.event.pull_request.draft == false && + needs.check-files.outputs.should_skip != 'true' && !( (github.actor == 'asyncapi-bot' && ( startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') || @@ -20,12 +44,7 @@ jobs: )) || (github.actor == 'allcontributors[bot]' && startsWith(github.event.pull_request.title, 'docs: add') - ) || - (github.event.pull_request.files.*.path == 'README.md') || - (github.event.pull_request.files.*.path == 'docs/**') || - (github.event.pull_request.files.*.path == '.github/**') || - (github.event.pull_request.files.*.path == 'CONTRIBUTING.md') || - (github.event.pull_request.files.*.path == 'Development.md') + ) ) name: Test generator as dependency with Node ${{ matrix.node }} runs-on: ubuntu-latest @@ -33,10 +52,6 @@ jobs: matrix: node: ["18", "20"] steps: - - name: Debug modified files - run: | - echo "Modified files:" - echo "${{ toJson(github.event.pull_request.files.*.path) }}" - name: Checkout repository uses: actions/checkout@v3 - name: Run test From da527e78ebb7ea6b6e9c23504bcfd4cde1fe6e8b Mon Sep 17 00:00:00 2001 From: AdityaPat_ <126982848+AdityaP700@users.noreply.github.com> Date: Thu, 23 Jan 2025 16:16:03 +0530 Subject: [PATCH 05/13] Update pr-testing-with-test-project.yml --- .../pr-testing-with-test-project.yml | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pr-testing-with-test-project.yml b/.github/workflows/pr-testing-with-test-project.yml index 3935df0c2..d9ec880fc 100644 --- a/.github/workflows/pr-testing-with-test-project.yml +++ b/.github/workflows/pr-testing-with-test-project.yml @@ -1,4 +1,3 @@ -#This workflow runs the tests in the test projects to make sure the generator works as a library where it is a Node dependency along with the template. name: Test using test project on: @@ -11,22 +10,25 @@ jobs: outputs: should_skip: ${{ steps.check.outputs.should_skip }} steps: + - name: Debug modified files + run: | + echo "Modified files:" + echo "${{ toJson(github.event.pull_request.files.*.path) }}" - name: Check for skippable files id: check - env: - PR_FILES: ${{ toJson(github.event.pull_request.files.*.path) }} run: | - SKIPPABLE_FILES=('README.md' 'docs/**' '.github/**' 'CONTRIBUTING.md' 'Development.md') - SKIP=false - - for file in "${SKIPPABLE_FILES[@]}"; do - if echo "$PR_FILES" | grep -q "$file"; then - SKIP=true + SKIPPABLE_FILES='README.md docs/ .github/ CONTRIBUTING.md Development.md' + SHOULD_SKIP=false + + for file in $SKIPPABLE_FILES; do + if [[ "${{ github.event.pull_request.files.*.path }}" == *"$file"* ]]; then + SHOULD_SKIP=true break fi done - - echo "should_skip=$SKIP" >> $GITHUB_OUTPUT + + echo "should_skip=$SHOULD_SKIP" >> $GITHUB_OUTPUT + echo "Should skip tests: $SHOULD_SKIP" test: needs: check-files @@ -52,6 +54,9 @@ jobs: matrix: node: ["18", "20"] steps: + - name: Debug if condition + run: | + echo "Should run tests: ${{ github.event.pull_request.draft == false && needs.check-files.outputs.should_skip != 'true' && !(github.actor == 'asyncapi-bot' || github.actor == 'asyncapi-bot-eve' || github.actor == 'allcontributors[bot]') }}" - name: Checkout repository uses: actions/checkout@v3 - name: Run test From 8166815ce160f599acfabcccb505fe14cff38c49 Mon Sep 17 00:00:00 2001 From: AdityaPat_ <126982848+AdityaP700@users.noreply.github.com> Date: Thu, 23 Jan 2025 20:45:44 +0530 Subject: [PATCH 06/13] Update pr-testing-with-test-project.yml --- .../pr-testing-with-test-project.yml | 41 ++++--------------- 1 file changed, 8 insertions(+), 33 deletions(-) diff --git a/.github/workflows/pr-testing-with-test-project.yml b/.github/workflows/pr-testing-with-test-project.yml index d9ec880fc..ec377744c 100644 --- a/.github/workflows/pr-testing-with-test-project.yml +++ b/.github/workflows/pr-testing-with-test-project.yml @@ -1,41 +1,19 @@ name: Test using test project - on: pull_request: types: [opened, reopened, synchronize, ready_for_review] + paths: + - '!**/*.md' + - '!README*' + - '!CONTRIBUTING*' + - '!.all-contributorsrc' + - '!LICENSE' + - '!CODE_OF_CONDUCT.md' jobs: - check-files: - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.check.outputs.should_skip }} - steps: - - name: Debug modified files - run: | - echo "Modified files:" - echo "${{ toJson(github.event.pull_request.files.*.path) }}" - - name: Check for skippable files - id: check - run: | - SKIPPABLE_FILES='README.md docs/ .github/ CONTRIBUTING.md Development.md' - SHOULD_SKIP=false - - for file in $SKIPPABLE_FILES; do - if [[ "${{ github.event.pull_request.files.*.path }}" == *"$file"* ]]; then - SHOULD_SKIP=true - break - fi - done - - echo "should_skip=$SHOULD_SKIP" >> $GITHUB_OUTPUT - echo "Should skip tests: $SHOULD_SKIP" - test: - needs: check-files if: > - github.event.pull_request.draft == false && - needs.check-files.outputs.should_skip != 'true' && - !( + !github.event.pull_request.draft && !( (github.actor == 'asyncapi-bot' && ( startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') || startsWith(github.event.pull_request.title, 'chore(release):') @@ -54,9 +32,6 @@ jobs: matrix: node: ["18", "20"] steps: - - name: Debug if condition - run: | - echo "Should run tests: ${{ github.event.pull_request.draft == false && needs.check-files.outputs.should_skip != 'true' && !(github.actor == 'asyncapi-bot' || github.actor == 'asyncapi-bot-eve' || github.actor == 'allcontributors[bot]') }}" - name: Checkout repository uses: actions/checkout@v3 - name: Run test From 45a35000373215469948da3597399c9fa01f41a6 Mon Sep 17 00:00:00 2001 From: AdityaPat_ <126982848+AdityaP700@users.noreply.github.com> Date: Thu, 23 Jan 2025 20:48:46 +0530 Subject: [PATCH 07/13] Update pr-testing-with-test-project.yml --- .../pr-testing-with-test-project.yml | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pr-testing-with-test-project.yml b/.github/workflows/pr-testing-with-test-project.yml index ec377744c..97a72394a 100644 --- a/.github/workflows/pr-testing-with-test-project.yml +++ b/.github/workflows/pr-testing-with-test-project.yml @@ -4,28 +4,37 @@ on: types: [opened, reopened, synchronize, ready_for_review] paths: - '!**/*.md' + - '!**/*.txt' - '!README*' - '!CONTRIBUTING*' - - '!.all-contributorsrc' - '!LICENSE' - '!CODE_OF_CONDUCT.md' + - '!.all-contributorsrc' + - 'package.json' + - 'package-lock.json' + - 'apps/**' + - 'packages/**' jobs: + should-test: + runs-on: ubuntu-latest + outputs: + run_tests: ${{ steps.check.outputs.run_tests }} + steps: + - name: Check if tests should run + id: check + run: | + if [[ "${{ github.actor }}" == "asyncapi-bot" ]] && [[ "${{ github.event.pull_request.title }}" =~ ^(ci: update|chore\(release\):) ]]; then + echo "run_tests=false" >> $GITHUB_OUTPUT + elif [[ "${{ github.actor }}" == "allcontributors[bot]" ]] && [[ "${{ github.event.pull_request.title }}" =~ ^docs: ]]; then + echo "run_tests=false" >> $GITHUB_OUTPUT + else + echo "run_tests=true" >> $GITHUB_OUTPUT + fi + test: - if: > - !github.event.pull_request.draft && !( - (github.actor == 'asyncapi-bot' && ( - startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') || - startsWith(github.event.pull_request.title, 'chore(release):') - )) || - (github.actor == 'asyncapi-bot-eve' && ( - startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') || - startsWith(github.event.pull_request.title, 'chore(release):') - )) || - (github.actor == 'allcontributors[bot]' && - startsWith(github.event.pull_request.title, 'docs: add') - ) - ) + needs: should-test + if: needs.should-test.outputs.run_tests == 'true' && !github.event.pull_request.draft name: Test generator as dependency with Node ${{ matrix.node }} runs-on: ubuntu-latest strategy: From 1fdb0fa6ed1d15af3d595c55c35d9a0fbda86093 Mon Sep 17 00:00:00 2001 From: AdityaPat_ <126982848+AdityaP700@users.noreply.github.com> Date: Thu, 23 Jan 2025 23:28:39 +0530 Subject: [PATCH 08/13] Update pr-testing-with-test-project.yml --- .../workflows/pr-testing-with-test-project.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-testing-with-test-project.yml b/.github/workflows/pr-testing-with-test-project.yml index 97a72394a..8b1641bae 100644 --- a/.github/workflows/pr-testing-with-test-project.yml +++ b/.github/workflows/pr-testing-with-test-project.yml @@ -1,10 +1,10 @@ name: Test using test project + on: pull_request: types: [opened, reopened, synchronize, ready_for_review] paths: - '!**/*.md' - - '!**/*.txt' - '!README*' - '!CONTRIBUTING*' - '!LICENSE' @@ -28,13 +28,15 @@ jobs: echo "run_tests=false" >> $GITHUB_OUTPUT elif [[ "${{ github.actor }}" == "allcontributors[bot]" ]] && [[ "${{ github.event.pull_request.title }}" =~ ^docs: ]]; then echo "run_tests=false" >> $GITHUB_OUTPUT + elif [[ ! -e ./package.json ]]; then + echo "run_tests=false" >> $GITHUB_OUTPUT else echo "run_tests=true" >> $GITHUB_OUTPUT fi test: needs: should-test - if: needs.should-test.outputs.run_tests == 'true' && !github.event.pull_request.draft + if: needs.should-test.outputs.run_tests == 'true' && github.event.pull_request.draft == false name: Test generator as dependency with Node ${{ matrix.node }} runs-on: ubuntu-latest strategy: @@ -43,6 +45,14 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - - name: Run test + - name: Check package.json exists + id: packagejson + run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT + shell: bash + - if: steps.packagejson.outputs.exists == 'true' + name: Install dependencies + run: npm ci + - if: steps.packagejson.outputs.exists == 'true' + name: Test run: NODE_IMAGE_TAG=${{ matrix.node }} docker compose up --abort-on-container-exit --remove-orphans --force-recreate working-directory: ./apps/generator/test/test-project From eac63d35eff525c433b7a09377871f84b5d46529 Mon Sep 17 00:00:00 2001 From: AdityaPat_ <126982848+AdityaP700@users.noreply.github.com> Date: Fri, 24 Jan 2025 00:19:47 +0530 Subject: [PATCH 09/13] Update pr-testing-with-test-project.yml --- .../pr-testing-with-test-project.yml | 29 ++++++------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pr-testing-with-test-project.yml b/.github/workflows/pr-testing-with-test-project.yml index 8b1641bae..5d4e94db8 100644 --- a/.github/workflows/pr-testing-with-test-project.yml +++ b/.github/workflows/pr-testing-with-test-project.yml @@ -4,16 +4,14 @@ on: pull_request: types: [opened, reopened, synchronize, ready_for_review] paths: - - '!**/*.md' - - '!README*' - - '!CONTRIBUTING*' - - '!LICENSE' - - '!CODE_OF_CONDUCT.md' - - '!.all-contributorsrc' - 'package.json' - 'package-lock.json' - 'apps/**' - 'packages/**' + - '.github/workflows/**' + # Explicitly ignore documentation + - '!**/*.md' + - '!docs/**' jobs: should-test: @@ -24,11 +22,9 @@ jobs: - name: Check if tests should run id: check run: | - if [[ "${{ github.actor }}" == "asyncapi-bot" ]] && [[ "${{ github.event.pull_request.title }}" =~ ^(ci: update|chore\(release\):) ]]; then - echo "run_tests=false" >> $GITHUB_OUTPUT - elif [[ "${{ github.actor }}" == "allcontributors[bot]" ]] && [[ "${{ github.event.pull_request.title }}" =~ ^docs: ]]; then - echo "run_tests=false" >> $GITHUB_OUTPUT - elif [[ ! -e ./package.json ]]; then + # Skip for bot PRs with specific titles + if [[ "${{ github.actor }}" == "asyncapi-bot" && "${{ github.event.pull_request.title }}" =~ ^(ci:\ update|chore\(release\):) ]] || \ + [[ "${{ github.actor }}" == "allcontributors[bot]" && "${{ github.event.pull_request.title }}" =~ ^docs: ]]; then echo "run_tests=false" >> $GITHUB_OUTPUT else echo "run_tests=true" >> $GITHUB_OUTPUT @@ -45,14 +41,7 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - - name: Check package.json exists - id: packagejson - run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT - shell: bash - - if: steps.packagejson.outputs.exists == 'true' - name: Install dependencies - run: npm ci - - if: steps.packagejson.outputs.exists == 'true' - name: Test + + - name: Run test run: NODE_IMAGE_TAG=${{ matrix.node }} docker compose up --abort-on-container-exit --remove-orphans --force-recreate working-directory: ./apps/generator/test/test-project From 735aefc1285e3c60b90d20acafe08ae0ec6c6b86 Mon Sep 17 00:00:00 2001 From: AdityaPat_ <126982848+AdityaP700@users.noreply.github.com> Date: Fri, 24 Jan 2025 01:04:13 +0530 Subject: [PATCH 10/13] fix: skip unnecessary test runs for bot-generated and non-critical PRs --- .github/workflows/pr-testing-with-test-project.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-testing-with-test-project.yml b/.github/workflows/pr-testing-with-test-project.yml index 5d4e94db8..4b945469c 100644 --- a/.github/workflows/pr-testing-with-test-project.yml +++ b/.github/workflows/pr-testing-with-test-project.yml @@ -9,7 +9,6 @@ on: - 'apps/**' - 'packages/**' - '.github/workflows/**' - # Explicitly ignore documentation - '!**/*.md' - '!docs/**' From 72756afc6292911a241baebde19216870ebb66ae Mon Sep 17 00:00:00 2001 From: AdityaPat_ <126982848+AdityaP700@users.noreply.github.com> Date: Fri, 24 Jan 2025 03:13:56 +0530 Subject: [PATCH 11/13] fix: skip unnecessary test runs for bot-generated and non-critical PRs --- .../pr-testing-with-test-project.yml | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-testing-with-test-project.yml b/.github/workflows/pr-testing-with-test-project.yml index 7c543f907..29a6b2e06 100644 --- a/.github/workflows/pr-testing-with-test-project.yml +++ b/.github/workflows/pr-testing-with-test-project.yml @@ -1,13 +1,37 @@ -#This workflow runs the tests in the test projects to make sure the generator works as a library where it is a Node dependency along with the template. name: Test using test project on: pull_request: types: [opened, reopened, synchronize, ready_for_review] + paths: + - 'package.json' + - 'package-lock.json' + - 'apps/' + - 'packages/' + - '.github/workflows/' + - '!/*.md' + - '!docs/**' jobs: + should-test: + runs-on: ubuntu-latest + outputs: + run_tests: ${{ steps.check.outputs.run_tests }} + steps: + - name: Check if tests should run + id: check + run: | + # Skip for bot PRs with specific titles + if [[ "${{ github.actor }}" == "asyncapi-bot" && "${{ github.event.pull_request.title }}" =~ ^(ci:\ update|chore\(release\):) ]] || \ + [[ "${{ github.actor }}" == "allcontributors[bot]" && "${{ github.event.pull_request.title }}" =~ ^docs: ]]; then + echo "run_tests=false" >> $GITHUB_OUTPUT + else + echo "run_tests=true" >> $GITHUB_OUTPUT + fi + test: - if: github.event.pull_request.draft == false + needs: should-test + if: needs.should-test.outputs.run_tests == 'true' && github.event.pull_request.draft == false name: Test generator as dependency with Node ${{ matrix.node }} runs-on: ubuntu-latest strategy: @@ -16,6 +40,7 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + - name: Run test run: NODE_IMAGE_TAG=${{ matrix.node }} docker compose up --abort-on-container-exit --remove-orphans --force-recreate working-directory: ./apps/generator/test/test-project From 804b2c9388bc4be393adf9bb138ee32ea1a6dfbd Mon Sep 17 00:00:00 2001 From: AdityaP700 <126982848+AdityaP700@users.noreply.github.com> Date: Sat, 25 Jan 2025 17:41:11 +0530 Subject: [PATCH 12/13] fixed the file path --- .github/workflows/pr-testing-with-test-project.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-testing-with-test-project.yml b/.github/workflows/pr-testing-with-test-project.yml index 809b935f0..724989c21 100644 --- a/.github/workflows/pr-testing-with-test-project.yml +++ b/.github/workflows/pr-testing-with-test-project.yml @@ -7,10 +7,10 @@ on: paths: - 'package.json' - 'package-lock.json' - - 'apps/' - - 'packages/' - - '.github/workflows/' - - '!/*.md' + - 'apps/**' + - 'packages/**' + - '.github/workflows/**' + - '!**/*.md' - '!docs/**' jobs: From 4d873e72bc95875a87e6f227b050a1f4fcb632c2 Mon Sep 17 00:00:00 2001 From: AdityaP700 <126982848+AdityaP700@users.noreply.github.com> Date: Wed, 29 Jan 2025 01:55:20 +0530 Subject: [PATCH 13/13] applied the changes for workflow --- .github/workflows/pr-testing-with-test-project.yml | 6 +++--- README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-testing-with-test-project.yml b/.github/workflows/pr-testing-with-test-project.yml index 724989c21..b9f10c0d4 100644 --- a/.github/workflows/pr-testing-with-test-project.yml +++ b/.github/workflows/pr-testing-with-test-project.yml @@ -1,4 +1,4 @@ -#This workflow runs the tests in the test projects to make sure the generator works as a library where it is a Node dependency along with the template. +# This workflow runs the tests in the test projects to make sure the generator works as a library where it is a Node dependency along with the template. name: Test using test project on: @@ -15,6 +15,7 @@ on: jobs: test: + if: github.event.pull_request.draft == false name: Test generator as dependency with Node ${{ matrix.node }} runs-on: ubuntu-latest strategy: @@ -43,8 +44,7 @@ jobs: run: echo "shouldrun=true" >> $GITHUB_OUTPUT shell: bash - - if: steps.should_run.outputs.shouldrun == true + - if: steps.should_run.outputs.shouldrun == 'true' name: Run test run: NODE_IMAGE_TAG=${{ matrix.node }} docker compose up --abort-on-container-exit --remove-orphans --force-recreate working-directory: ./apps/generator/test/test-project - \ No newline at end of file diff --git a/README.md b/README.md index 1021adc4b..6c6789828 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This is a Monorepo managed using [Turborepo](https://turbo.build/) and contains 1. [Hooks](apps/hooks): This library contains generator filters that can be reused across multiple templates, helping to avoid redundant work. Hooks are designed to let template developers hook into the template generation process. For example, one can create a hook code that will be automatically invoked right after the template generation process has ended. -1. [Nunjucks-filters](apps/nunjucks-filters): This library contains generator filters that can be reused across multiple templates helping to avoid redundant work. The filters are designed specifically for Nunjucks templates and are included by default with the generator, so there's no need to add them to dependencies separately. +1. [Nunjucks-filters](apps/nunjucks-filters): This library contains generator filters that can be reused across multiple templates helping to avoid redundant work. These filters are designed specifically for Nunjucks templates and are included by default with the generator, so there's no need to add them to dependencies separately. > [!IMPORTANT] > **Deprecation Notice:** The Nunjucks renderer engine is deprecated and will be removed in future releases. We strongly recommend using the React renderer engine instead. You can find how to migrate from Nunjucks to React in the [migration guide](apps/generator/docs/nunjucks-depreciate.md)