Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Node.js CI - CA E2E #155

Node.js CI - CA E2E

Node.js CI - CA E2E #155

name: Node.js CI - CA E2E
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
env:
DOCKER_REG: 'ghcr.io'
jobs:
# Test
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- name: Login to GitHub Registry
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3
with:
registry: ${{ env.DOCKER_REG }}
username: $GITHUB_ACTOR
password: ${{ secrets.VNF_GITHUB_TOKEN }}
- name: Checkout repo
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Restore yarn cached
id: cache-yarn-restore
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('yarn.lock') }}
- name: Install Dependencies
run: yarn install --frozen-lockfile --prefer-offline
- name: Start Containers
run: docker compose -f ./servers/credentialagent/e2e/docker-compose.yml up -d
- name: Wait for Fineract to launch
run: while ! curl http://localhost:13008; do echo "Waiting for Fineract to launch on port 13008..."; sleep 4; done;
- name: Deploy Blockchain Contracts
run: RPC_NODE_URL=http://localhost:18545 node ./tools/contracts-deployment/index
- name: Run Oracle Migrations
working-directory: ./servers/oracle
run: MIGRATION_ENV=localdev yarn migrate:up
- name: Test
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
with:
timeout_minutes: 10
max_attempts: 2
retry_on: timeout
command: yarn nx run @velocitycareerlabs/server-credentialagent:test:e2e
env:
IS_CI: true
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_TLS_REJECT_UNAUTHORIZED: 0