Skip to content

Commit 9e072c4

Browse files
committed
github actions test
1 parent d1b82db commit 9e072c4

File tree

2 files changed

+39
-8
lines changed

2 files changed

+39
-8
lines changed

.github/workflows/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [18.x, 20.x]
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
29+
- name: Install Dependencies
30+
run: npm ci
31+
32+
- name: Run Build
33+
run: npm run build
34+
35+
- name: Lint Check
36+
run: npm run lint --if-present
37+
38+
- name: Validate tests
39+
run: npm run test --if-present

src/colors/colorPalette.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ class ColorPalette {
3232
this.algorithm = new Histogram();
3333
}
3434

35-
async getHistogram() {
36-
if (this.histogram.length === 0) {
37-
await this.loadHistogram();
38-
}
39-
40-
return this.histogram;
41-
}
42-
4335
protected imageProcessorInit(imageUrl: string): IImageProcessor {
4436
return new SharpImageProcessor(imageUrl);
4537
}

0 commit comments

Comments
 (0)