Skip to content

Commit 0cf698f

Browse files
authored
Merge pull request #74 from micgro42/chore/switchToNPMandUpdate
2 parents 79c9660 + 71607a3 commit 0cf698f

File tree

10 files changed

+13004
-6429
lines changed

10 files changed

+13004
-6429
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616

1717
- name: Install and Build
1818
run: |
19-
yarn install
20-
yarn build --base=/cssColorNameFinder/
19+
npm ci
20+
npm run build -- --base=/cssColorNameFinder/
2121
- name: Deploy 🚀
2222
uses: JamesIves/github-pages-deploy-action@releases/v3
2323
with:

.github/workflows/commitlint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
- name: Set up node
1313
uses: actions/setup-node@v3
1414
with:
15-
node-version: '16.x'
15+
node-version: '24'
1616
- name: Install
17-
run: yarn install --frozen-lockfile
17+
run: npm ci
1818
- name: Lint commits
19-
run: yarn commitlint --verbose --from `git log -1 HEAD^1 --pretty=format:'%H'`
19+
run: npx commitlint --from f0082a4

.github/workflows/sonarqube.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on:
2+
# Trigger analysis when pushing to your main branches, and when creating a pull request.
3+
push:
4+
branches:
5+
- main
6+
- master
7+
- develop
8+
- 'releases/**'
9+
pull_request:
10+
types: [opened, synchronize, reopened]
11+
12+
name: SonarQube Main Workflow
13+
jobs:
14+
sonarqube:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
# Disabling shallow clones is recommended for improving the relevancy of reporting
20+
fetch-depth: 0
21+
- name: Install
22+
run: npm ci
23+
- name: Test
24+
run: npm run test:unit --coverage
25+
- name: SonarQube Scan
26+
uses: SonarSource/sonarqube-scan-action@a31c9398be7ace6bbfaf30c0bd5d415f843d45e9 # v7.0.0
27+
env:
28+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/test-and-lint.yml

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,8 @@ jobs:
1212
- name: Set up node
1313
uses: actions/setup-node@v3
1414
with:
15-
node-version: '16.x'
15+
node-version: '24'
1616
- name: Install
17-
run: yarn install --frozen-lockfile
17+
run: npm ci
1818
- name: Test
19-
run: yarn test
20-
21-
unit-test-and-sonar:
22-
name: Unit tests and coverage for sonar
23-
runs-on: ubuntu-latest
24-
steps:
25-
- name: Checkout
26-
uses: actions/checkout@v3
27-
with:
28-
fetch-depth: 0
29-
- name: Set up node
30-
uses: actions/setup-node@v3
31-
with:
32-
node-version: '16.x'
33-
- name: Install
34-
run: yarn install --frozen-lockfile
35-
- name: Test
36-
run: yarn test:unit --coverage
37-
- name: Setup Sonar Scanner
38-
uses: warchant/setup-sonar-scanner@v3
39-
- name: Run sonarqube
40-
env:
41-
# to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
run: sonar-scanner
44-
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
45-
-Dsonar.host.url=https://sonarcloud.io/
19+
run: npm run test

.husky/commit-msg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npx --no-install commitlint --edit "" || true

.husky/pre-commit

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
4-
yarn lint-staged
1+
npx lint-staged

0 commit comments

Comments
 (0)