Skip to content

Commit 3a41ff6

Browse files
committed
Chore: Fix npm building
1 parent e06f08c commit 3a41ff6

File tree

4 files changed

+6
-30
lines changed

4 files changed

+6
-30
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ jobs:
2121
with:
2222
node-version: '16.x'
2323

24-
- name: Install dependencies
25-
run: npm ci
26-
27-
- name: Build app.js
28-
run: npm run build:ci
29-
3024
- name: Build and Check Package
3125
uses: hynek/build-and-inspect-python-package@v1
3226

.github/workflows/tests.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- master
77

88
schedule:
9-
- cron: '1 0 * * *' # Run daily at 0:01 UTC
9+
- cron: '0 14 * * *' # Run daily at 14:00 UTC
1010

1111
pull_request:
1212

@@ -46,12 +46,6 @@ jobs:
4646
with:
4747
node-version: '16.x'
4848

49-
- name: Install dependencies
50-
run: npm ci
51-
52-
- name: Build app.js
53-
run: npm run build:ci
54-
5549
- name: Build and Check Package
5650
uses: hynek/build-and-inspect-python-package@v1
5751

@@ -129,12 +123,6 @@ jobs:
129123
with:
130124
node-version: '16.x'
131125

132-
- name: Install dependencies
133-
run: npm ci
134-
135-
- name: Build app
136-
run: npm run build:ci
137-
138126
- name: Set up python
139127
uses: actions/setup-python@v4
140128
with:
@@ -203,12 +191,6 @@ jobs:
203191
with:
204192
node-version: '16.x'
205193

206-
- name: Install dependencies
207-
run: npm ci
208-
209-
- name: Build app
210-
run: npm run build:ci
211-
212194
- name: Set up python
213195
uses: actions/setup-python@v4
214196
with:

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"scripts": {
3-
"unit": "nyc mocha testing/**/unittest.js",
4-
"build:ci": "npm run build:css && npm run build:jsapp",
3+
"build": "npm run build:css && npm run build:jsapp",
54
"build:css": "sass --no-source-map --no-error-css src/layout/css/style.scss src/pytest_html/resources/style.css",
65
"build:jsapp": "browserify ./src/pytest_html/scripts/index.js > ./src/pytest_html/resources/app.js",
7-
"build": "npm run unit && npm run build:css && npm run build:jsapp",
8-
"lint": "eslint src/pytest_html/scripts/ testing/"
6+
"lint": "eslint src/pytest_html/scripts/ testing/",
7+
"unit": "nyc mocha testing/**/unittest.js",
8+
"all": "npm run lint && npm run unit && npm run build:css && npm run build:jsapp"
99
},
1010
"devDependencies": {
1111
"browserify": "^17.0.0",

scripts/npm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55

66
class NpmBuildHook(BuildHookInterface):
77
def initialize(self, version, build_data):
8-
subprocess.check_output("npm install", shell=True)
8+
subprocess.check_output("npm ci", shell=True)
99
subprocess.check_output("npm run build", shell=True)

0 commit comments

Comments
 (0)