From 6c8f4b10c08eb5f7e955a691f56753deeefbec82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20Mi=C5=9Btal?= Date: Mon, 8 Jan 2024 21:33:23 +0100 Subject: [PATCH] Update CI workflows --- .github/workflows/publish-cli.yml | 2 +- .github/workflows/publish.yml | 2 +- .github/workflows/test.yml | 12 +----------- tests/templates.test.ts | 14 ++++++++------ 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/publish-cli.yml b/.github/workflows/publish-cli.yml index 4ca2c1c..0b1acbf 100644 --- a/.github/workflows/publish-cli.yml +++ b/.github/workflows/publish-cli.yml @@ -5,7 +5,7 @@ on: - cli-v* jobs: test: - name: Run tests on npm build + name: Run tests on local build runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 72411b4..ed9be48 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,7 @@ jobs: with: node-version: 20 - run: yarn install - - run: yarn test:local + - run: yarn test publish: name: Publish package runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9abadcc..029aaa5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,16 +1,6 @@ name: Test the package on: pull_request jobs: - test-npm: - name: Run tests on npm build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 20 - - run: yarn install - - run: yarn test test-local: name: Run tests on local build runs-on: ubuntu-latest @@ -20,4 +10,4 @@ jobs: with: node-version: 20 - run: yarn install - - run: yarn test:local + - run: yarn test diff --git a/tests/templates.test.ts b/tests/templates.test.ts index 049b5f4..a4a564e 100644 --- a/tests/templates.test.ts +++ b/tests/templates.test.ts @@ -147,9 +147,10 @@ describe.each(TEMPLATES)(`Template $name`, (template) => { server = await cmd("npm run start") .cwd(path.join(tmpdir, "test")) .awaitOutput(["Running in", "production"]) - .awaitOutput( - `Serving static files from ${path.join(tmpdir, "test", "dist")}`, - ) + .awaitOutput([ + `Serving static files from`, + path.join(tmpdir, "test", "dist"), + ]) .awaitOutput("Server is listening on port 3000...") .run(); @@ -341,9 +342,10 @@ describe.each(TEMPLATES)(`Template $name`, (template) => { server = await cmd("npm run start") .cwd(path.join(tmpdir, "test")) .awaitOutput(["Running in", "production"]) - .awaitOutput( - `Serving static files from ${path.join(tmpdir, "test", "dist")}`, - ) + .awaitOutput([ + `Serving static files from`, + path.join(tmpdir, "test", "dist"), + ]) .awaitOutput("Server is listening on port 3000...") .run();