feat: Add OPERATOR
tier
#8976
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
name: Dapp Tests | |
on: | |
pull_request: | |
branches: [main, release/**] | |
push: | |
branches: [main, release/**] | |
tags: [v*] | |
concurrency: | |
group: pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
setup-local-hedera: | |
name: Dapp Tests | |
runs-on: smart-contracts-linux-medium | |
timeout-minutes: 45 # Set to 45 minutes for now | |
permissions: | |
contents: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | |
with: | |
egress-policy: audit | |
- name: Checkout repo | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Setup node | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: 20 | |
- name: Install build tools | |
run: sudo apt-get update && sudo apt-get install -y make gcc g++ | |
- name: Install packages | |
run: npm ci | |
- name: Create .env file | |
run: | | |
cp ./dapp-example/localDappCI.env ./dapp-example/.env | |
cp ./packages/server/tests/localAcceptance.env .env | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Build Typescript | |
run: npx lerna run build | |
- name: Start the hedera local node | |
run: npx hedera start -d | |
- name: Stop the local node's relay | |
run: docker stop json-rpc-relay | |
- name: Start the local relay | |
run: npm run start & | |
- name: Build, Bootstrap & Test the dapp in Docker | |
run: docker compose up --exit-code-from synpress | |
working-directory: ./dapp-example/ | |
- name: Dump relay logs | |
if: ${{ always() && !cancelled() }} | |
uses: step-security/gh-docker-logs@3ae8dd28117ab6b0e4ef83c53662ef18fcaa2181 # v2.2.2 | |
with: | |
dest: './logs' | |
- name: Tar logs | |
if: ${{ always() && !cancelled() }} | |
run: tar cvzf ./logs.tgz ./logs | |
- name: Upload logs to GitHub | |
if: ${{ always() && !cancelled() }} | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: logs.tgz | |
path: ./logs.tgz | |
- name: Publish Reports | |
uses: mikepenz/action-junit-report@9379f0ccddcab154835d4e2487555ee79614fe95 # v4.2.1 | |
if: ${{ always() && !cancelled() }} | |
with: | |
check_name: Dapp Test Report | |
report_paths: "**/*.xml" | |
detailed_summary: true |