Skip to content

Commit

Permalink
Update CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
szymmis committed Jan 8, 2024
1 parent 0d9b342 commit 6c8f4b1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -20,4 +10,4 @@ jobs:
with:
node-version: 20
- run: yarn install
- run: yarn test:local
- run: yarn test
14 changes: 8 additions & 6 deletions tests/templates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit 6c8f4b1

Please sign in to comment.