Skip to content

Commit

Permalink
feat: add title check workflow (#442)
Browse files Browse the repository at this point in the history
Signed-off-by: georgi-l95 <[email protected]>
  • Loading branch information
georgi-l95 authored Nov 16, 2023
1 parent ad9e747 commit c64ee30
Show file tree
Hide file tree
Showing 5 changed files with 153 additions and 220 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/browser-tests.yaml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/flow-pr-title-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
##
# Copyright (C) 2023 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 Check"
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- edited
- synchronize

defaults:
run:
shell: bash

concurrency:
group: pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
title-check:
name: Title Check
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- name: Check PR Title
uses: aslafy-z/conventional-pr-title-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108 changes: 108 additions & 0 deletions .github/workflows/flow-pull-request-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
##
# Copyright (C) 2023 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

defaults:
run:
shell: bash

concurrency:
group: pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
smoke-tests:
name: Smoke Tests
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: [18.x]
network: [mainnet, testnet, local, previewnet]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: |
npm ci
cd test/smoke
npm ci
- name: Start the local node with ${{ matrix.network }} images
run: npm run start -- --network ${{ matrix.network }} -d

- name: Run smoke test
uses: nick-fields/retry@v2
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: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: [18.x]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: 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
51 changes: 0 additions & 51 deletions .github/workflows/smoke-tests.yaml

This file was deleted.

120 changes: 0 additions & 120 deletions .github/workflows/update-config-files.yaml

This file was deleted.

0 comments on commit c64ee30

Please sign in to comment.