Skip to content

Commit

Permalink
ci: setup
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Jun 24, 2024
1 parent ab21c2e commit d47dfa0
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 36 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Unit Test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/[email protected]

- name: Set node LTS
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm

- name: Install
run: pnpm install

- name: Lint
run: pnpm run lint

- name: Typecheck
run: pnpm run typecheck

test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [18, 20, 22]
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/[email protected]

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

- name: Install
run: pnpm install

- name: Build
run: pnpm run build

- name: Test
run: pnpm run test
25 changes: 13 additions & 12 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014 Dave Justice
Copyright © 2024 no-shims (https://github.com/no-shims)

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
20 changes: 20 additions & 0 deletions LICENSE-original
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2014 Dave Justice

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 changes: 7 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# @no-shims/is-core-module <sup>[![Version Badge][2]][1]</sup>
# @no-shims/is-core-module [![npm](https://img.shields.io/npm/v/@no-shims/is-core-module.svg)](https://npmjs.com/package/@no-shims/is-core-module)

[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][5]][6]
[![dev dependency status][7]][8]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

[![npm badge][11]][1]
[![Unit Test](https://github.com/no-shims/is-core-module/actions/workflows/unit-test.yml/badge.svg)](https://github.com/no-shims/is-core-module/actions/workflows/unit-test.yml)

Is this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version.

Expand All @@ -25,18 +18,8 @@ assert(!isCore('butts'))

Clone the repo, `pnpm install`, and run `pnpm test`

[1]: https://npmjs.org/package/@no-shims/is-core-module
[2]: https://versionbadg.es/no-shims/is-core-module.svg
[5]: https://david-dm.org/no-shims/is-core-module.svg
[6]: https://david-dm.org/no-shims/is-core-module
[7]: https://david-dm.org/no-shims/is-core-module/dev-status.svg
[8]: https://david-dm.org/no-shims/is-core-module#info=devDependencies
[11]: https://nodei.co/npm/@no-shims/is-core-module.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/@no-shims/is-core-module.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/@no-shims/is-core-module.svg
[downloads-url]: https://npm-stat.com/charts.html?package=@no-shims/is-core-module
[codecov-image]: https://codecov.io/gh/no-shims/is-core-module/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/no-shims/is-core-module/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/no-shims/is-core-module
[actions-url]: https://github.com/no-shims/is-core-module/actions
## License

[MIT](./LICENSE) License © 2024 [no-shims](https://github.com/no-shims)

[MIT](./LICENSE-original) License © 2014 Dave Justice

0 comments on commit d47dfa0

Please sign in to comment.