Skip to content

Pass through Chainport errors (#1798) #5136

Pass through Chainport errors (#1798)

Pass through Chainport errors (#1798) #5136

Workflow file for this run

name: API CI
on:
pull_request:
branches:
- '*'
push:
branches:
- master
env:
API_URL: http://localhost:8003
DATABASE_CONNECTION_POOL_URL: postgres://postgres:password@localhost:5432/ironfish_api_test
DATABASE_URL: postgres://postgres:password@localhost:5432/ironfish_api_test
DATADOG_URL: 127.0.0.1
INFLUXDB_API_TOKEN: test
INFLUXDB_BUCKET: test
INFLUXDB_ORG: Iron Fish
INFLUXDB_URL: http://localhost:8004
INCENTIVIZED_TESTNET_URL: http://localhost:3001
IRONFISH_API_KEY: test
IRONFISH_POSTGRES_CONTAINER: ironfish_postgres
NETWORK_VERSION: 0
ENABLE_SIGNUP: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Restore Yarn cache
id: yarn-cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install packages
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --non-interactive --frozen-lockfile
- name: Generate Prisma schema
run: npx prisma generate
- name: Lint
run: yarn lint
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Restore Yarn cache
id: yarn-cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install packages
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --non-interactive --frozen-lockfile
- name: Generate Prisma schema
run: npx prisma generate
- name: Start Docker
run: yarn docker:start
- name: Wait for Postgres
run: until docker exec $IRONFISH_POSTGRES_CONTAINER pg_isready; do sleep 5; done
- name: Run migrations
run: npx prisma migrate deploy
- name: Run tests
run: yarn test
env:
NODE_OPTIONS: --max_old_space_size=8192
- name: Stop Docker
run: yarn docker:stop