Draft: build(deps): bump npm from 9.6.7 to 10.5.0 #120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
pull_request: | |
branches: | |
- "**" | |
push: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
integration-test: | |
name: integration tests on ${{ matrix.os }} with NodeJS ${{ matrix.node-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- "${{ vars.WF_UBUNTU_LTS }}" | |
- "${{ vars.WF_MACOS_LATEST }}" | |
- "${{ vars.WF_MACOS_OLD }}" | |
- "${{ vars.WF_WINDOWS_LATEST }}" | |
- "${{ vars.WF_WINDOWS_OLD }}" | |
node-version: | |
- "${{ vars.WF_NODEJS_OLD }}" | |
steps: | |
- name: Checkout Release from lens | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Add the current IP address, long hostname and short hostname record to /etc/hosts file | |
if: runner.os == 'Linux' | |
run: | | |
echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts | |
- name: Using Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install npm version matching NodeJS | |
if: ${{ matrix.node-version == vars.WF_NODEJS_LATEST }} | |
run: npm install -g npm@${{ vars.WF_NPM_LATEST }} | |
- name: Install npm version matching NodeJS | |
if: ${{ matrix.node-version == vars.WF_NODEJS_OLD }} | |
run: npm install -g npm@${{ vars.WF_NPM_OLD }} | |
- name: Ensure pip is installed | |
if: ${{ runner.os == 'macOS' }} | |
run: python3 -m ensurepip | |
- name: Install setuptools on ${{ vars.WF_MACOS_OLD }} | |
if: ${{ matrix.os == vars.WF_MACOS_OLD }} | |
run: python3 -m pip install setuptools | |
- name: Get npm cache directory path | |
if: ${{ runner.os != 'Windows' }} | |
id: npm-cache-dir-path | |
shell: bash | |
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
if: ${{ runner.os != 'Windows' }} | |
id: npm-cache # use this to check for `cache-hit` (`steps.npm-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.npm-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- uses: nick-fields/retry@v2 | |
name: Install dependencies | |
with: | |
timeout_minutes: 20 | |
max_attempts: 3 | |
retry_on: error | |
command: npm ci | |
- name: Install integration test dependencies | |
id: minikube | |
uses: medyagh/setup-minikube@master | |
with: | |
minikube-version: latest | |
if: ${{ runner.os == 'Linux' }} | |
- run: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' npm run test:integration | |
name: Run Linux integration tests | |
if: ${{ runner.os == 'Linux' }} | |
- run: npm run test:integration | |
name: Run macOS integration tests | |
shell: bash | |
if: ${{ runner.os == 'macOS' }} | |
- run: npm run test:integration | |
name: Run Windows integration tests | |
if: ${{ runner.os == 'Windows' }} | |
unit-test: | |
name: unit tests on ${{ matrix.os }} with NodeJS ${{ matrix.node-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- "${{ vars.WF_UBUNTU_LTS }}" | |
node-version: | |
# - "${{ vars.WF_NODEJS_LATEST }}" | |
- "${{ vars.WF_NODEJS_OLD }}" | |
steps: | |
- name: Checkout Release from lens | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Add the current IP address, long hostname and short hostname record to /etc/hosts file | |
if: runner.os == 'Linux' | |
run: | | |
echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts | |
- name: Using Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install npm version matching NodeJS | |
if: ${{ matrix.node-version == vars.WF_NODEJS_LATEST }} | |
run: npm install -g npm@${{ vars.WF_NPM_LATEST }} | |
- name: Install npm version matching NodeJS | |
if: ${{ matrix.node-version == vars.WF_NODEJS_OLD }} | |
run: npm install -g npm@${{ vars.WF_NPM_OLD }} | |
- name: Get npm cache directory path | |
if: ${{ runner.os != 'Windows' }} | |
id: npm-cache-dir-path | |
shell: bash | |
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
if: ${{ runner.os != 'Windows' }} | |
id: npm-cache # use this to check for `cache-hit` (`steps.npm-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.npm-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- uses: nick-fields/retry@v2 | |
name: Install dependencies | |
with: | |
timeout_minutes: 20 | |
max_attempts: 3 | |
retry_on: error | |
command: npm ci | |
- run: | | |
npm run build -- --ignore open-lens | |
npm run test:unit | |
name: Run tests |