Skip to content

Merge develop to main (20241014) #406

Merge develop to main (20241014)

Merge develop to main (20241014) #406

Workflow file for this run

name: Backend Test
on:
pull_request:
paths:
- backend/**
push:
branches: [main, develop]
paths:
- backend/**
jobs:
build:
runs-on: ubuntu-latest
services:
redis-cache:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
redis-queue:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6380:6379
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install PNPM
uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '21'
cache: 'pnpm'
- uses: pnpm/action-setup@v4
- name: Install dependency
run: pnpm install
- name: Run Build
run: pnpm run build
working-directory: backend
- name: Run Test
run: |
touch .env
echo BITCOIN_PRIMARY_DATA_PROVIDER="${{ secrets.BITCOIN_PRIMARY_DATA_PROVIDER }}" >> .env
echo BITCOIN_MEMPOOL_SPACE_API_URL="${{ secrets.BITCOIN_MEMPOOL_SPACE_API_URL }}" >> .env
echo BITCOIN_ELECTRS_API_URL="{{ secrets.BITCOIN_ELECTRS_API_URL }}" >> .env
echo CKB_EXPLORER_API_URL="${{ secrets.CKB_EXPLORER_API_URL }}" >> .env
echo CKB_RPC_WEBSOCKET_URL="${{ secrets.CKB_RPC_WEBSOCKET_URL }}" >> .env
echo REDIS_CACHE_URL="redis://localhost:6379" >> .env
echo REDIS_QUEUE_URL="redis://localhost:6380" >> .env
echo DATABASE_URL="postgres://postgres:postgres@postgres:5432/explorer?sslmode=disable" >> .env
cat .env
pnpm run test
working-directory: backend
- name: Docker Build Test
run: docker compose build