Test Sync Decentralized #22609
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: Test Sync Decentralized | |
on: | |
schedule: | |
- cron: '0 * * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Testing sync status on the decentralized network | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT" | |
- uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- run: yarn install --immutable | |
- run: cp .env.mainnet.example .env | |
- name: Notify about environment preparation failure | |
uses: lidofinance/[email protected] | |
with: | |
args: | | |
Unable to run `${{ github.workflow }}` workflow. | |
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
if: ${{ failure() }} | |
- run: yarn test:sync | |
env: | |
SUBGRAPH_NAME: lidofinance/lido | |
GRAPH: ${{ secrets.THEGRAPH_DECENTRALIZED_ENDPOINT }} | |
GRAPH_MONITORING: https://api.thegraph.com/index-node/graphql | |
RPC: ${{ secrets.RPC_MAINNET }} | |
id: test | |
- name: notify about failed test run | |
uses: lidofinance/[email protected] | |
with: | |
args: | | |
Lido SubGraph on mainnet is out of sync now! | |
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
if: ${{ failure() && steps.test.conclusion == 'failure' }} |