diff --git a/.github/workflows/pr-testing-with-test-project.yml b/.github/workflows/pr-testing-with-test-project.yml index 7c543f907..b9f10c0d4 100644 --- a/.github/workflows/pr-testing-with-test-project.yml +++ b/.github/workflows/pr-testing-with-test-project.yml @@ -1,9 +1,17 @@ -#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: pull_request: types: [opened, reopened, synchronize, ready_for_review] + paths: + - 'package.json' + - 'package-lock.json' + - 'apps/**' + - 'packages/**' + - '.github/workflows/**' + - '!**/*.md' + - '!docs/**' jobs: test: @@ -16,6 +24,27 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - - name: Run test + + - name: Determine if tests should run + id: should_run + 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') + ) + ) + run: echo "shouldrun=true" >> $GITHUB_OUTPUT + shell: bash + + - 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 diff --git a/README.md b/README.md index 346b6a84c..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. 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. 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)