Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CI pipeline to the project #3

Merged
merged 4 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
push:
branches: main
tags: "v*"
pull_request:
branches: "*"

jobs:
push:
name: push
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org
cache: yarn

- run: yarn install --frozen-lockfile
- run: yarn run build
- run: yarn run test

- name: Publish to NPM
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"name": "comlink",
"version": "4.4.2",
"version": "1.0.0",
"description": "Comlink makes WebWorkers enjoyable",
"main": "dist/umd/comlink.js",
"module": "dist/esm/comlink.mjs",
"types": "dist/umd/comlink.d.ts",
"sideEffects": false,
"scripts": {
"prepack": "npm run build",
"build": "rollup -c",
"build": "rollup -c && npm run fmt",
"test:unit": "karma start",
"test:node": "mocha ./tests/node/main.mjs",
"test:types": "tsc -p ./tests/tsconfig.json",
"test:types:watch": "npm run test:types -- --watch",
"test": "npm run fmt_test && npm run build && npm run test:types && npm run test:unit && npm run test:node",
"test": "npm run fmt_test && npm run test:types && npm run test:unit && npm run test:node",
ctw-joao-luis marked this conversation as resolved.
Show resolved Hide resolved
"fmt": "prettier --write './*.{mjs,js,ts,md,json,html}' './{src,docs,tests}/{,**/}*.{mjs,js,ts,md,json,html}'",
"fmt_test": "test $(prettier -l './*.{mjs,js,ts,md,json,html}' './{src,docs,tests}/{**/,}*.{mjs,js,ts,md,json,html}' | wc -l) -eq 0",
"watchtest": "CHROME_ONLY=1 karma start --no-single-run"
},
"author": {
"name": "Surma",
"email": "surma@google.com"
"name": "Lichtblick",
"email": "lichtblick@bmwgroup.com"
},
"files": [
"dist"
Expand Down
Loading