Skip to content

feat: Remove previewnet, testnet, mainnet configuration #488

feat: Remove previewnet, testnet, mainnet configuration

feat: Remove previewnet, testnet, mainnet configuration #488

##
# 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: [self-hosted, Linux, medium, ephemeral]
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
- 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: [self-hosted, Linux, large, ephemeral ]
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
- 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: [self-hosted, Linux, medium, ephemeral]
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@84508663e988701840491b86de86b666e8a86bed # v4.3.0