Skip to content

Commit

Permalink
Migrate metadata-check to cron workflow (#3300)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorhodes authored Feb 22, 2024
1 parent 7c1375b commit 3bd520e
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 29 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: cron

# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
on:
schedule:
- cron: '45 14 * * *'
workflow_dispatch:

env:
DEBUG: 'hyperlane:*'

jobs:
# copied from test.yml
yarn-install:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 18

- uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
submodules: recursive

- name: yarn-cache
uses: actions/cache@v3
with:
path: |
**/node_modules
.yarn
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}

- name: yarn-install
run: yarn install

# copied from test.yml
yarn-build:
runs-on: ubuntu-latest
needs: [yarn-install]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
submodules: recursive
fetch-depth: 0

- name: yarn-cache
uses: actions/cache@v3
with:
path: |
**/node_modules
.yarn
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}

- name: build-cache
uses: actions/cache@v3
with:
path: |
./*
!./rust
key: ${{ github.sha }}

- name: build
run: yarn build

metadata-check:
runs-on: ubuntu-latest
needs: [yarn-build]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
submodules: recursive
fetch-depth: 0

- name: yarn-cache
uses: actions/cache@v3
with:
path: |
**/node_modules
.yarn
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}

- name: build-cache
uses: actions/cache@v3
with:
path: |
./*
!./rust
key: ${{ github.sha }}

- name: Metadata Health Check
run: DEBUG=hyperlane yarn workspace @hyperlane-xyz/sdk run test:metadata
29 changes: 0 additions & 29 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,35 +132,6 @@ jobs:
- name: Unit Tests
run: yarn test:ci

metadata-check:
runs-on: ubuntu-latest
needs: [yarn-build]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
submodules: recursive
fetch-depth: 0

- name: yarn-cache
uses: actions/cache@v3
with:
path: |
**/node_modules
.yarn
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}

- name: build-cache
uses: actions/cache@v3
with:
path: |
./*
!./rust
key: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Metadata Health Check
run: DEBUG=hyperlane yarn workspace @hyperlane-xyz/sdk run test:metadata

e2e-matrix:
runs-on: larger-runner
needs: [yarn-build]
Expand Down

0 comments on commit 3bd520e

Please sign in to comment.