Skip to content

chore: Bump actions/setup-node from 4.0.2 to 4.1.0 #803

chore: Bump actions/setup-node from 4.0.2 to 4.1.0

chore: Bump actions/setup-node from 4.0.2 to 4.1.0 #803

##
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##
name: "PR Checks"
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
push:
branches:
- main
defaults:
run:
shell: bash
permissions:
contents: read
concurrency:
group: pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
smoke-tests:
name: Smoke Tests
runs-on: local-node-linux-medium
strategy:
fail-fast: false
matrix:
node-version: [18.x]
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: |
npm ci
cd test/smoke
npm ci
- name: Start the local node
run: npm run start -- -d --verbose=trace
- name: Run smoke test
uses: step-security/retry@2ab886c0de89f68f146c9b43f53e61abc59c46dc # v3.0.1
with:
max_attempts: 3
timeout_minutes: 3
command: npm run test:smoke
- name: Stop the local node
run: npm run stop
browser-tests:
name: Browser Tests
runs-on: local-node-linux-large
strategy:
fail-fast: false
matrix:
node-version: [18.x]
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev -y
sudo apt-get install libnss3 libxss1 libasound2 libxtst6 xauth xvfb -y
npm ci
- name: Start local node
run: npm run start -- -d --verbose=trace
- name: Prepare and run the tests
run: |
cd test/cypress
npm ci
npm run build
npm run start
npm run test
- name: Stop the local node
run: npm run stop
unit-tests:
name: Unit Tests
runs-on: local-node-linux-medium
strategy:
fail-fast: false
matrix:
node-version: [18.x]
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test
- name: Upload coverage report
if: ${{ always() && !cancelled() }}
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}