diff --git a/.github/workflows/pr-testing-with-generator.yml b/.github/workflows/pr-testing-with-generator.yml deleted file mode 100644 index 0e966eed0..000000000 --- a/.github/workflows/pr-testing-with-generator.yml +++ /dev/null @@ -1,28 +0,0 @@ -#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 diff --git a/package.json b/package.json index db5fd7452..c1db13ce4 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "homepage": "https://github.com/asyncapi/html-template#readme", "scripts": { "lint": "echo \"No linter specified yet\"", + "test:library": "jest --coverage", "test:generator": "npm run test:generator:v2 && npm run test:generator:v3", "test:generator:v2": "asyncapi generate fromTemplate ./test/spec/asyncapi_v2.yml ./ -o test/output --force-write", "test:generator:v3": "asyncapi generate fromTemplate ./test/spec/asyncapi_v3.yml ./ -o test/output --force-write", @@ -30,7 +31,7 @@ "bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION", "copy:sources": "node ./scripts/copy-sources.js", "prepublishOnly": "npm run generate:assets", - "test": "jest --coverage" + "test": "npm run test:library && npm run test:generator" }, "publishConfig": { "access": "public"