Skip to content

Use badges to redirect to a release #2437

Use badges to redirect to a release

Use badges to redirect to a release #2437

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: CI
on:
push:
branches: [main]
pull_request: {}
jobs:
build:
strategy:
matrix:
node-version: [18, 20, 22]
system:
- os: ubuntu-22.04
runs-on: ${{ matrix.system.os }}
services:
postgres:
image: postgres:13
env:
POSTGRES_DB: indexer_tests
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: update OS
run: |
sudo apt-get update
sudo apt install -y --no-install-recommends gcc g++ make build-essential
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
- run: yarn install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- run: yarn test:ci
env:
POSTGRES_TEST_HOST: localhost
POSTGRES_TEST_DATABASE: indexer_tests
POSTGRES_TEST_USERNAME: testuser
POSTGRES_TEST_PASSWORD: testpass
NODE_OPTIONS: "--dns-result-order=ipv4first"
INDEXER_TEST_JRPC_PROVIDER_URL: ${{ secrets.TESTS_RPC_PROVIDER }}
INDEXER_TEST_API_KEY: ${{ secrets.TESTS_API_KEY }}