Skip to content

fix: Docker resources check on Windows Server 2022 #786

fix: Docker resources check on Windows Server 2022

fix: Docker resources check on Windows Server 2022 #786

##
# 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: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
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@052d8009a065e321fd72db951d7e412f8063b9e5 # v3.0.0
with:
max_attempts: 3
timeout_minutes: 3
command: npm run test:smoke
- name: Stop the local node
run: npm run stop
smoke-tests-windows:
name: Smoke Tests on Windows
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
node-version: [18.x]
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: |
npm ci
cd test/smoke
npm ci
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
- name: Start the local node
run: npm run start -- -d --verbose=trace
- name: Run smoke test
uses: step-security/retry@052d8009a065e321fd72db951d7e412f8063b9e5 # v3.0.0
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: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
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: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
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@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}