Skip to content

Commit

Permalink
Merge pull request #563 from Webperf-se/npm-install-improvement
Browse files Browse the repository at this point in the history
Don't install development dependencies for npm
  • Loading branch information
7h3Rabbit authored Jul 1, 2024
2 parents bae4758 + bee58a3 commit e58bdc0
Show file tree
Hide file tree
Showing 21 changed files with 23 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/regression-test-css.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
sudo apt-get --only-upgrade install google-chrome-stable
google-chrome --version
- name: Setup npm packages
run: npm install
run: npm install --production
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
node-version: '20.x'
- name: Setup npm packages
run: npm install
run: npm install --production
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regression-test-html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
sudo apt-get --only-upgrade install google-chrome-stable
google-chrome --version
- name: Setup npm packages
run: npm install
run: npm install --production
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regression-test-http.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
sudo apt-get --only-upgrade install google-chrome-stable
google-chrome --version
- name: Setup npm packages
run: npm install
run: npm install --production
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regression-test-pa11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
node-version: '20.x'
- name: Setup npm packages
run: npm install
run: npm install --production
# Havn't yet been able to start Google Chrome in headless mode in pa11y since move to Chrome in Pa11y 5
- if: ${{ matrix.os == 'ubuntu-20.04' }}
name: RUNNING TEST - LINUX
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regression-test-sitespeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
sudo apt-get --only-upgrade install google-chrome-stable
google-chrome --version
- name: Setup npm packages
run: npm install
run: npm install --production
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regression-test-software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
sudo apt-get --only-upgrade install google-chrome-stable
google-chrome --version
- name: Setup npm packages
run: npm install
run: npm install --production
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regression-test-tracking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
name: Setup GeckoDriver (Used for Selenium)
run: wget -q -O - https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz | tar -xvzf -
- name: Setup npm packages
run: npm install
run: npm install --production
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regression-test-ylt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: sudo apt-get install libjpeg-dev libfontconfig
shell: bash
- name: Setup npm packages
run: npm install
run: npm install --production
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: RUNNING TEST - LINUX
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
sudo apt-get --only-upgrade install google-chrome-stable
google-chrome --version
- name: Setup npm packages
run: npm install
run: npm install --production
- name: Update USER_AGENT in our defaults/settings.json
run: python update_software.py -b
- name: Checkout advisory-database repo
Expand Down
8 changes: 1 addition & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,7 @@ RUN chown --recursive sitespeedio:sitespeedio /usr/src/runner
# Run everything after as non-privileged user.
USER sitespeedio

RUN npm install

WORKDIR /usr/src/runner/node_modules/sitespeed.io/

RUN npm install

WORKDIR /usr/src/runner
RUN npm install --production

RUN python3.12 -m pip install -r requirements.txt --break-system-packages && \
python3.12 -m pip install --upgrade pip --break-system-packages && \
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started-local.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ it is also best/fastest when wanting to contribute with new tests, translations
- Download and install Node.js (version 20.x)
- Download and install Google Chrome browser
* Download and install Mozilla Firefox
- Install required npm packages by typing following and hit Enter: `npm install`
- Install required npm packages by typing following and hit Enter: `npm install --production`
- Validate that core functionality is working by typing following and hit Enter `python default.py -h`
- If the output looks something like example in [options and arguments](getting-started.md#options-and-arguments) you have successfully setup the general parts of webperf-core.
- Please look at/return to the [specific test](tests/README.md) you want to run to make sure it doesn't require more steps.
Expand Down
2 changes: 1 addition & 1 deletion docs/tests/css.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Read more on the [general page for github actions](../getting-started-github-act

* Download and install Node.js (version 20.x)
* Download and install Google Chrome browser
* Install NPM packages ( `npm install` )
* Install NPM packages ( `npm install --production` )
* Set `sitespeed_use_docker = False` in your `config.py`

##### Windows Specific
Expand Down
2 changes: 1 addition & 1 deletion docs/tests/google-lighthouse-based.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Follow the instructions below depending on what you choose.
Benefit of this option is that you can use it to test pre production urls like your AcceptanceTest environment.

* Download and install Node.js (version 20.x)
* Install NPM packages ( `npm install` )
* Install NPM packages ( `npm install --production` )

## Read more

Expand Down
2 changes: 1 addition & 1 deletion docs/tests/html.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Read more on the [general page for github actions](../getting-started-github-act

* Download and install Node.js (version 20.x)
* Download and install Google Chrome browser
* Install NPM packages ( `npm install` )
* Install NPM packages ( `npm install --production` )
* Set `sitespeed_use_docker = False` in your `config.py`

##### Windows Specific
Expand Down
2 changes: 1 addition & 1 deletion docs/tests/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Read more on the [general page for github actions](../getting-started-github-act
* Download and install Node.js (version 20.x)
* Download and install Google Chrome browser
* Download and install Mozilla Firefox browser
* Install NPM packages ( `npm install` )
* Install NPM packages ( `npm install --production` )
* Set `sitespeed_use_docker = False` in your `config.py`

##### Windows Specific
Expand Down
2 changes: 1 addition & 1 deletion docs/tests/pa11y.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Read more on the [general page for github actions](../getting-started-github-act
* Follow [general local setup steps for this repository](../getting-started-local.md)
* Download and install Node.js (version 20.x)
* Download and install Google Chrome browser
* Install NPM packages ( `npm install` )
* Install NPM packages ( `npm install --production` )

## FAQ

Expand Down
4 changes: 2 additions & 2 deletions docs/tests/sitespeed.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Read more on the [general page for github actions](../getting-started-github-act
* Install ffmpeg `sudo apt install ffmpeg`
* Download and install Node.js (version 20.x)
* Download and install Google Chrome browser
* Install NPM packages ( `npm install` )
* Install NPM packages ( `npm install --production` )
* Set `sitespeed_use_docker = False` in your `config.py`

(You can always see [GitHub Actions SiteSpeed](../../.github/workflows/regression-test-sitespeed.yml) for all steps required line by line)
Expand All @@ -86,7 +86,7 @@ Read more on the [general page for github actions](../getting-started-github-act
* Download and Install ffmpeg `https://ffmpeg.org/download.html#build-windows`
* Download and install Node.js (version 20.x)
* Download and install Google Chrome browser
* Install NPM packages ( `npm install` )
* Install NPM packages ( `npm install --production` )
* Set `sitespeed_use_docker = False` in your `config.py`

#### Using Docker image
Expand Down
2 changes: 1 addition & 1 deletion docs/tests/software.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ TODO: Add links to blogs and articles showing how to remove info regarding what

* Download and install Node.js (version 20.x)
* Download and install Google Chrome browser
* Install NPM packages ( `npm install` )
* Install NPM packages ( `npm install --production` )
* Set `sitespeed_use_docker = False` in your `config.py`

##### Windows Specific
Expand Down
2 changes: 1 addition & 1 deletion docs/tests/tracking.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ This section has not been written yet.
* Download and install Node.js (version 20.x)
* Download and install Google Chrome browser
* Download and install Mozilla Firefox
* Install NPM packages ( `npm install` )
* Install NPM packages ( `npm install --production` )
* Set `sitespeed_use_docker = False` in your `config.py`

##### Windows Specific
Expand Down
4 changes: 2 additions & 2 deletions docs/tests/yellowlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ Read more on the [general page for github actions](../getting-started-github-act
* Download and install Node.js (version 20.x)
* Download and install node-gyp `npm install -g node-gyp`
* Setup libjpeg and fontconfig `sudo apt-get install libjpeg-dev libfontconfig`
* Install NPM packages ( `npm install` )
* Install NPM packages ( `npm install --production` )

##### On Windows:
* Download and install Node.js (version 20.x)
* Install NPM packages ( `npm install` )
* Install NPM packages ( `npm install --production` )

## FAQ

Expand Down

0 comments on commit e58bdc0

Please sign in to comment.