Skip to content

Commit

Permalink
Merge pull request #276 from kodadot/migrate-from-v0
Browse files Browse the repository at this point in the history
migrate from v0
  • Loading branch information
vikiival committed Sep 28, 2023
2 parents c50513d + feeacf1 commit ed1540a
Show file tree
Hide file tree
Showing 5 changed files with 2,557 additions and 1,765 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/subsquid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- name: install @subsquid/cli
run: npm install --location=global @subsquid/cli@0.7.4
run: npm install --location=global @subsquid/cli
- name: auth subsquid
run: |
BRANCH=${{ github.ref_name }}
Expand All @@ -23,8 +23,4 @@ jobs:
sqd auth -k ${{ secrets.DEPLOYMENT_KEY }}
- name: deploy subsquid
id: deploy
continue-on-error: true
run: sqd squid release ${{ github.event.repository.name }}@${{ env.VERSION }} -v
- name: update subsquid
if: steps.deploy.outcome == 'failure'
run: sqd squid update ${{ github.event.repository.name }}@${{ env.VERSION }} -v
run: sqd deploy -u -m ${{ env.VERSION }}.yaml .
31 changes: 21 additions & 10 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
default := 'squid'

process: build
node -r dotenv/config lib/processor.js

serve:
@npx squid-graphql-server

up:
docker compose up
up *FLAGS:
docker compose up {{FLAGS}}

upd:
@just up -d

pull:
docker compose pull
Expand All @@ -32,12 +37,14 @@ explore:
--archive https://kusama.archive.subsquid.io/graphql \
--out kusamaVersions.jsonl

bug: down up
bug: down upd

reset: migrate

quickstart: migrate process

quick: build reset process

prod TAG:
gh pr create --base release-{{TAG}}

Expand All @@ -47,28 +54,32 @@ migrate:
update-db:
npx squid-typeorm-migration generate

db: update-db migrate

test:
npm run test:unit

improve TAG:
npx sqd squid:update rubick@{{TAG}}
improve TAG=default:
npx sqd deploy -m {{TAG}}.yaml .

release TAG:
npx sqd squid:release rubick@{{TAG}}
release TAG=default:
npx sqd deploy -m {{TAG}}.yaml .

kill TAG:
npx sqd squid:kill "rubick@{{TAG}}"

tail TAG:
npx sqd squid logs rubick@{{TAG}} -f

brutal TAG:
npx sqd squid:update rubick@{{TAG}} --hardReset
brutal TAG=default:
npx sqd deploy -r -m {{TAG}}.yaml .

update-deps:
npx npm-check-updates -u
npx npm-check-updates -ux

exec:
docker exec -it rubick-db-1 psql -U postgres -d squid

check: codegen build

kek: bug quick
Loading

0 comments on commit ed1540a

Please sign in to comment.