Skip to content

Commit

Permalink
feat: test action
Browse files Browse the repository at this point in the history
  • Loading branch information
enzonotario committed Sep 20, 2024
1 parent 7ab1fe3 commit 4c33b23
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test

on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
node_version: [lts/*]
os: [ubuntu-latest, windows-latest]
fail-fast: false
steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 9

- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: pnpm

- name: Install
run: pnpm i

- name: Build
run: pnpm run build

- name: Test
run: pnpm run test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "pnpm --stream -r run build",
"bump": "/bin/bash scripts/bump.sh",
"release": "/bin/bash scripts/release.sh",
"test": "echo \"Error: no test specified\" && exit 1",
"test": "pnpm --stream -r run test:run",
"sherif": "pnpm dlx sherif@latest --fix",
"format": "pnpm biome format --write ."
},
Expand Down
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test:run": "echo \"Error: no test specified\"",
"postinstall": "node postinstall.js"
},
"repository": {
Expand Down
1 change: 1 addition & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@es-js/esbabel": "workspace:*",
"@putout/bundle": "^3.15.0",
"@types/node": "^20.9.0",
"prettier": "^3.3.3",
"typescript": "^5.2.2",
"unbuild": "^2.0.0",
"vite": "^5.1.1",
Expand Down
10 changes: 10 additions & 0 deletions packages/core/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/language-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"dev": "node src/index.js",
"build": "node src/index.js",
"test": "echo \"Error: no test specified\" && exit 1",
"test:run": "echo \"Error: no test specified\"",
"prepublish": "pnpm run build"
},
"repository": {
Expand Down

0 comments on commit 4c33b23

Please sign in to comment.