chore: added new postman tests #1240
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
tests: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
with: | |
path: cardano-rosetta | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- name: Lint and test | |
working-directory: ./cardano-rosetta/cardano-rosetta-server | |
run: | | |
yarn install --offline --frozen-lockfile --logevel=error | |
yarn lint | |
yarn test | |
env: | |
PORT: 8080 | |
LOGGER_LEVEL: debug | |
LOGGER_ENABLED: true | |
BIND_ADDRESS: 127.0.0.1 | |
DB_CONNECTION_STRING: postgresql://postgres:[email protected]:5432/mainnet | |
TOPOLOGY_FILE_PATH: test/e2e/utils/topology-test.json | |
# PATHs should be strings and must exist | |
CARDANO_CLI_PATH: /tmp | |
CARDANO_NODE_PATH: /tmp | |
CARDANO_NODE_SOCKET_PATH: /tmp | |
GENESIS_SHELLEY_PATH: test/e2e/utils/mainnet-genesis.json | |
PAGE_SIZE: 5 | |
DEFAULT_RELATIVE_TTL: 1000 | |
- name: Build Cardano Rosetta | |
uses: ./cardano-rosetta/.github/actions/build_cardano_rosetta | |
with: | |
build-context: ${{ github.workspace }}/cardano-rosetta | |
tag: ${{ github.sha }} | |
- name: Start-container | |
run: docker run --rm -d -p 8080:8080 cardano-rosetta:${{ github.sha }} | |
- name: Wait for docker to start | |
run: sleep 60 | |
- name: "Install Node" | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '21.x' | |
- name: "Install newman" | |
run: npm install -g newman | |
- name: "Run tests" | |
working-directory: ./cardano-rosetta | |
run: newman run ./test/deployed-environment-test/rosetta-java.postman_collection.json -e ./test/deployed-environment-test/environments/mainnet-typescript.postman_environment.json -r cli |