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

chore: add CI for main and PRs #153

Merged
merged 5 commits into from
Dec 16, 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
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: ci

on:
push:
branches: [v4, alpha, beta]

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

permissions:
contents: write
id-token: write

jobs:
test-and-publish:
name: Test
if: github.repository == 'Vibrant-Colors/node-vibrant'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Run Tests
run: pnpm run test
27 changes: 27 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: pr

on:
pull_request:
paths-ignore:
- 'media/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Run Checks
run: pnpm run test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,6 @@ dist/
.vscode/

.build

.nx/cache
.nx/workspace-data
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.18.1
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# node-vibrant

<img align="right" width="265" src="logo.png?raw=true">

[![Slack badge](https://badgen.net/badge/slack/node-vibrant?icon=slack)](https://join.slack.com/t/node-vibrant/shared_invite/enQtNTI2Mzg2NDk5MzUxLTdkN2EwMWNkYjY0MjNiMmI2YzFjZWM3Njc3ZDJmOWVkMzBkNzYzMDBhZTBiMGI0MjAyMmJhNDc0YTNlNjA5ZGY)
[![Build Status](https://badgen.net/travis/akfish/node-vibrant/develop?label=build)](https://travis-ci.org/akfish/node-vibrant)
<a href="https://www.npmjs.com/package/node-vibrant" target="\_parent">
<img alt="" src="https://img.shields.io/npm/dm/node-vibrant.svg" />
</a><a href="https://bundlephobia.com/package/node-vibrant@latest" target="\_parent">
<img alt="" src="https://badgen.net/bundlephobia/minzip/node-vibrant" />
</a><a href="https://github.com/Vibrant-Colors/node-vibrant/discussions">
<img alt="Join the discussion on Github" src="https://img.shields.io/badge/Github%20Discussions%20%26%20Support-Chat%20now!-blue" />
</a><a href="https://bestofjs.org/projects/node-vibrant"><img alt="Best of JS" src="https://img.shields.io/endpoint?url=https://bestofjs-serverless.now.sh/api/project-badge?fullName=Vibrant-Colors%2Fnode-vibrant%26since=daily" /></a><a href="https://github.com/Vibrant-Colors/node-vibrant/" target="\_parent">
<img alt="" src="https://img.shields.io/github/stars/Vibrant-Colors/node-vibrant.svg?style=social&label=Star" />
</a>

<img align="right" width="265" src="./media/logo.png?raw=true">

Extract prominent colors from an image.

Expand Down
File renamed without changes
15 changes: 15 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"defaultBase": "v4",
"targetDefaults": {
"test:lib": {
"cache": true,
"dependsOn": ["^build"]
},
"build": {
"cache": true,
"dependsOn": ["^build"],
"outputs": ["{projectRoot}/dist"]
}
}
}
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"private": true,
"packageManager": "pnpm@9.14.4",
"scripts": {
"clean": "run-p -c clean:*",
"clean:tsc": "lerna exec -- rimraf dist",
"compile:tsc": "tsc",
"build": "lerna run build",
"lint": "run-p -c lint:*",
Expand All @@ -14,11 +12,9 @@
"format:packages": "eslint ./packages --fix",
"format:fixtures": "eslint ./fixtures --fix",
"test": "run-p -c test:*",
"test:sherif": "sherif -i react -i react-dom",
"test:lib": "lerna run test",
"test:sherif": "sherif",
"test:lib": "lerna run test:lib",
"test:knip": "knip",
"sample:inspect": "pnpm --dir=fixtures/sample run start",
"sample:update": "pnpm --dir=fixtures/sample run update",
"prepare": "husky install && playwright install chromium"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/node-vibrant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
"scripts": {
"build": "vite build",
"test": "vitest run",
"test:lib": "vitest run",
"test:watch": "vitest watch"
},
"bugs": {
Expand Down
4 changes: 2 additions & 2 deletions packages/vibrant-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "4.0.0-alpha.2",
"description": "Core vibrant classes",
"scripts": {
"test": "vitest run",
"test:watch": "vitest watch",
"test:lib": "vitest run",
"test:lib:watch": "vitest watch",
"build": "vite build"
},
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions packages/vibrant-image-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "Browser vibrant ImageClass implementation",
"scripts": {
"build": "vite build",
"test": "vitest run",
"test:watch": "vitest watch"
"test:lib": "vitest run",
"test:lib:watch": "vitest watch"
},
"type": "module",
"types": "dist/esm/index.d.ts",
Expand Down
Loading