Skip to content

chore(cu): add logging and debug readState pipeline #67

chore(cu): add logging and debug readState pipeline

chore(cu): add logging and debug readState pipeline #67

Workflow file for this run

name: 🦘 Test & Deploy AO Compute Unit
on:
pull_request:
branches:
- main
paths:
- "servers/cu/**"
push:
branches:
- main
paths:
- "servers/cu/**"
defaults:
run:
shell: bash
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: βŽ” Setup node
uses: actions/setup-node@v3
with:
node-version: 20
- name: πŸ“₯ Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: servers/cu
- name: ⚑ Run Tests
working-directory: servers/cu
run: |
npm test
env:
CI: true
deploy:
runs-on: ubuntu-latest
# Only deploy on main branch
if: github.ref == 'refs/heads/main'
# Uncomment if we ever start running the release job
# needs: [test, release]
needs: [test]
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
with:
ref: ${{ needs.bump.outputs.TAG }}
- name: βŽ” Setup node
uses: actions/setup-node@v3
with:
node-version: 20
- name: πŸ“₯ Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: servers/cu
- name: πŸ‘€ Env
run: |
echo "Event name: ${{ github.event_name }}"
echo "Git ref: ${{ github.ref }}"
echo "GH actor: ${{ github.actor }}"
echo "SHA: ${{ github.sha }}"
VER=`node --version`; echo "Node ver: $VER"
VER=`npm --version`; echo "npm ver: $VER"
- name: πŸš€ Deploy
working-directory: servers/cu
env:
DEPLOY_HOOK: ${{ secrets.CU_RENDER_DEPLOY_HOOK }}
run: |
node deploy.js