From a9d95089184d1469dd4862154f50fee1691f9e87 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Thu, 28 Sep 2023 12:46:41 +0200 Subject: [PATCH] add workflow to test with generator --- .../workflows/pr-testing-with-generator.yml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/pr-testing-with-generator.yml diff --git a/.github/workflows/pr-testing-with-generator.yml b/.github/workflows/pr-testing-with-generator.yml new file mode 100644 index 000000000..0e966eed0 --- /dev/null +++ b/.github/workflows/pr-testing-with-generator.yml @@ -0,0 +1,28 @@ +#We need something more sophisticated long term but for now adding simple tests that just runs the generation +name: Use the template with the generator + +on: + pull_request: + types: [opened, reopened, synchronize, ready_for_review] + +jobs: + test: + if: github.event.pull_request.draft == false + name: Generation with generator + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Check package-lock version + uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master + id: lockversion + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "${{ steps.lockversion.outputs.version }}" + cache: 'npm' + cache-dependency-path: '**/package-lock.json' + - name: Install dependencies + run: npm install + - name: Run generation + run: npm run test:generator