diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 03c35a06..983075c4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,12 +21,6 @@ jobs: with: node-version: '16.x' - - name: Install dependencies - run: npm ci - - - name: Build app.js - run: npm run build:ci - - name: Build and Check Package uses: hynek/build-and-inspect-python-package@v1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9f9d7b47..71e508f8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,7 @@ on: - master schedule: - - cron: '1 0 * * *' # Run daily at 0:01 UTC + - cron: '0 14 * * *' # Run daily at 14:00 UTC pull_request: @@ -46,12 +46,6 @@ jobs: with: node-version: '16.x' - - name: Install dependencies - run: npm ci - - - name: Build app.js - run: npm run build:ci - - name: Build and Check Package uses: hynek/build-and-inspect-python-package@v1 @@ -129,12 +123,6 @@ jobs: with: node-version: '16.x' - - name: Install dependencies - run: npm ci - - - name: Build app - run: npm run build:ci - - name: Set up python uses: actions/setup-python@v4 with: @@ -203,12 +191,6 @@ jobs: with: node-version: '16.x' - - name: Install dependencies - run: npm ci - - - name: Build app - run: npm run build:ci - - name: Set up python uses: actions/setup-python@v4 with: diff --git a/package.json b/package.json index 02028036..e8b23125 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "scripts": { - "unit": "nyc mocha testing/**/unittest.js", - "build:ci": "npm run build:css && npm run build:jsapp", + "build": "npm run build:css && npm run build:jsapp", "build:css": "sass --no-source-map --no-error-css src/layout/css/style.scss src/pytest_html/resources/style.css", "build:jsapp": "browserify ./src/pytest_html/scripts/index.js > ./src/pytest_html/resources/app.js", - "build": "npm run unit && npm run build:css && npm run build:jsapp", - "lint": "eslint src/pytest_html/scripts/ testing/" + "lint": "eslint src/pytest_html/scripts/ testing/", + "unit": "nyc mocha testing/**/unittest.js", + "all": "npm run lint && npm run unit && npm run build:css && npm run build:jsapp" }, "devDependencies": { "browserify": "^17.0.0", diff --git a/scripts/npm.py b/scripts/npm.py index 4624e69c..e70ee04c 100644 --- a/scripts/npm.py +++ b/scripts/npm.py @@ -5,5 +5,5 @@ class NpmBuildHook(BuildHookInterface): def initialize(self, version, build_data): - subprocess.check_output("npm install", shell=True) + subprocess.check_output("npm ci", shell=True) subprocess.check_output("npm run build", shell=True)