ci: Update flow-pr-title-check.yaml (#913) #1003
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
# SPDX-License-Identifier: Apache-2.0 | |
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: hiero-local-node-linux-medium | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3 | |
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 | |
# Note: After Step-Security is enabled return to step-security/retry | |
- name: Run smoke test | |
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # 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: hiero-local-node-linux-large | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3 | |
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: hiero-local-node-linux-medium | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3 | |
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@5c47607acb93fed5485fdbf7232e8a31425f672a # v5.0.2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |