-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add test workflow * chore: more cleanup
- Loading branch information
1 parent
65de756
commit c1cf014
Showing
5 changed files
with
73 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: 'Tests' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: {} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint-build: | ||
name: 'lint & build' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
cache: pnpm | ||
node-version: lts/* | ||
- run: corepack enable && pnpm --version | ||
- run: pnpm install | ||
- run: pnpm lint | ||
- run: pnpm prettier:check | ||
- run: pnpm test:ts | ||
- run: pnpm build | ||
- uses: actions/upload-artifact@v3 | ||
name: Cache build output | ||
with: | ||
name: build-output | ||
path: | | ||
bin/ | ||
dist/ | ||
# test-unit: | ||
# needs: 'lint-build' | ||
# name: 'test:unit (${{ matrix.node }})' | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# # A test failing on windows doesn't mean it'll fail on macos. It's useful to let all tests run to its completion to get the full picture | ||
# fail-fast: false | ||
# matrix: | ||
# node: [18, 20] | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: pnpm/action-setup@v3 | ||
# - uses: actions/setup-node@v4 | ||
# with: | ||
# cache: pnpm | ||
# node-version: ${{ matrix.node }} | ||
# - run: corepack enable && pnpm --version | ||
# - run: pnpm install | ||
# - uses: actions/download-artifact@v3 | ||
# name: Restore build output | ||
# with: | ||
# name: build-output | ||
# - run: pnpm test:unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.