Skip to content

CardanoSolutions/gh-action-cardano-node-ogmios-docker-sync

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cardano-node-ogmios Docker Sync GitHub Action

Use this action to sync an instance of cardano-node-ogmios into a cache to enable integration testing within a GitHub Workflow. As demonstrated in the Ogmios repository, the network synchronization workflow synchronizes a testnet instance every six hours, which is then pushed to a cache used in the continuous integration workflow.

Usage

see action.yml for all possible options.

Basic

Be aware that this will do a full resync on every run.

steps:
- uses: actions/checkout@v2

- uses: CardanoSolutions/cardano-node-ogmios-docker-sync@v1

With cache and multiple networks

strategy:
  matrix:
    network: [ testnet, mainnet ]

steps:
- uses: actions/checkout@v2

- id: date-time
  shell: bash
  run: |
      echo "::set-output name=value::$(/bin/date -u "+%Y%m%d-%H%M%S")"

- uses: actions/cache@v2
  with:
    path: ${{ runner.temp }}/db-${{ matrix.network }}
    key: cardano-node-${{ matrix.network }}-${{ steps.date-time.outputs.value }}
    restore-keys: |
      cardano-node-${{ matrix.network }}

- uses: CardanoSolutions/cardano-node-ogmios-docker-sync@v1
  with:
    db-dir: ${{ runner.temp }}/db-${{ matrix.network }}
    network: ${{ matrix.network }}