From 710295446d6f3b6d6497d1e054b0138c65900927 Mon Sep 17 00:00:00 2001 From: Bryan White Date: Thu, 10 Nov 2022 11:54:03 +0100 Subject: [PATCH 01/11] chore: rename test action to quality --- .github/workflows/{test.yml => quality.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{test.yml => quality.yml} (97%) diff --git a/.github/workflows/test.yml b/.github/workflows/quality.yml similarity index 97% rename from .github/workflows/test.yml rename to .github/workflows/quality.yml index c9a7fbb2f..28cb877a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/quality.yml @@ -1,11 +1,11 @@ -name: End-to-end tests +name: Repo Quality on: pull_request: branches: [main] jobs: - e2e-tests: + checks: runs-on: ubuntu-latest steps: From 5972461ab93ca5d214dba3d9a6015ff610939891 Mon Sep 17 00:00:00 2001 From: Bryan White Date: Thu, 10 Nov 2022 12:26:19 +0100 Subject: [PATCH 02/11] chore: add migrations workflow --- .github/workflows/migrations.yml | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/migrations.yml diff --git a/.github/workflows/migrations.yml b/.github/workflows/migrations.yml new file mode 100644 index 000000000..bb0efdecb --- /dev/null +++ b/.github/workflows/migrations.yml @@ -0,0 +1,46 @@ +name: DB Migration + +on: + pull_request: + branches: [main] + +jobs: + checks: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Update + run: sudo apt update + - name: Install OS dependencies + run: sudo apt install -y python3-dev nodejs + + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install graphile-migrate + run: npm install -g graphile-migrate + + - name: Install NodeJS dependencies + run: yarn install + + - name: Codegen TypeScript + run: yarn codegen + + - name: Build TypeScript + run: yarn build + + - name: Start-up local test environment + uses: isbang/compose-action@v1.2.0 + with: + compose-file: "./ci-compose.yml" + + - name: Graphile-migrate reset DB + run: . .gm.env && graphile-migrate reset --erase + + - name: Run graphile-migrate migrations + run: . .gm.env && graphile-migrate migrate From 85789bbdb89caa085120985695b708855b122bfa Mon Sep 17 00:00:00 2001 From: Bryan White Date: Thu, 10 Nov 2022 15:33:04 +0100 Subject: [PATCH 03/11] fix: update CI docker compose postgres --- ci-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-compose.yml b/ci-compose.yml index efcb6db11..8c3842bfd 100644 --- a/ci-compose.yml +++ b/ci-compose.yml @@ -2,7 +2,7 @@ version: "3" services: postgres: - image: postgres:14-alpine + image: bryanchriswhite/ledger-subquery-postgres:stable ports: - 5432:5432 volumes: @@ -130,4 +130,4 @@ services: WASM_RELAYER_MNEMONIC: "all expect burger grit believe forest match math holiday polar roof soccer thank focus note lion gesture dream bounce pony whip scale group refuse" expose: - 3000 # REST API https://hermes.informal.systems/rest-api.html#endpoints - - 3001 # prometheus telemetry \ No newline at end of file + - 3001 # prometheus telemetry From f7c41f8e4a8e4d51fe1cfd7a19b567df80e6a87e Mon Sep 17 00:00:00 2001 From: Bryan White Date: Thu, 10 Nov 2022 11:54:03 +0100 Subject: [PATCH 04/11] chore: rename test action to quality --- .github/workflows/{test.yml => quality.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{test.yml => quality.yml} (97%) diff --git a/.github/workflows/test.yml b/.github/workflows/quality.yml similarity index 97% rename from .github/workflows/test.yml rename to .github/workflows/quality.yml index b08ef4b71..412dc7836 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/quality.yml @@ -1,11 +1,11 @@ -name: End-to-end tests +name: Repo Quality on: pull_request: branches: [main] jobs: - e2e-tests: + checks: runs-on: ubuntu-latest steps: From 9426a85e6c3ef662f0f600467752ad00df3d92db Mon Sep 17 00:00:00 2001 From: Bryan White Date: Thu, 10 Nov 2022 12:26:19 +0100 Subject: [PATCH 05/11] chore: add migrations workflow --- .github/workflows/migrations.yml | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/migrations.yml diff --git a/.github/workflows/migrations.yml b/.github/workflows/migrations.yml new file mode 100644 index 000000000..bb0efdecb --- /dev/null +++ b/.github/workflows/migrations.yml @@ -0,0 +1,46 @@ +name: DB Migration + +on: + pull_request: + branches: [main] + +jobs: + checks: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Update + run: sudo apt update + - name: Install OS dependencies + run: sudo apt install -y python3-dev nodejs + + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install graphile-migrate + run: npm install -g graphile-migrate + + - name: Install NodeJS dependencies + run: yarn install + + - name: Codegen TypeScript + run: yarn codegen + + - name: Build TypeScript + run: yarn build + + - name: Start-up local test environment + uses: isbang/compose-action@v1.2.0 + with: + compose-file: "./ci-compose.yml" + + - name: Graphile-migrate reset DB + run: . .gm.env && graphile-migrate reset --erase + + - name: Run graphile-migrate migrations + run: . .gm.env && graphile-migrate migrate From dec5913d412f1d99b820a75734889c09a16d5e96 Mon Sep 17 00:00:00 2001 From: Bryan White Date: Thu, 10 Nov 2022 15:33:04 +0100 Subject: [PATCH 06/11] fix: update CI docker compose postgres --- ci-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-compose.yml b/ci-compose.yml index 6250a8811..5564e7d9f 100644 --- a/ci-compose.yml +++ b/ci-compose.yml @@ -2,7 +2,7 @@ version: "3" services: postgres: - image: postgres:14-alpine + image: bryanchriswhite/ledger-subquery-postgres:stable ports: - 5432:5432 volumes: @@ -134,4 +134,4 @@ services: WASM_RELAYER_MNEMONIC: "all expect burger grit believe forest match math holiday polar roof soccer thank focus note lion gesture dream bounce pony whip scale group refuse" expose: - 3000 # REST API https://hermes.informal.systems/rest-api.html#endpoints - - 3001 # prometheus telemetry \ No newline at end of file + - 3001 # prometheus telemetry From 2375b2def1cf39086958df27e545a8e67ed104e4 Mon Sep 17 00:00:00 2001 From: Bryan White Date: Tue, 27 Dec 2022 17:37:03 +0100 Subject: [PATCH 07/11] fix: add GH_ACCESS_TOKEN secret token --- .github/workflows/migrations.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/migrations.yml b/.github/workflows/migrations.yml index bb0efdecb..446e3a074 100644 --- a/.github/workflows/migrations.yml +++ b/.github/workflows/migrations.yml @@ -12,6 +12,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive + token: ${{ secrets.GH_ACCESS_TOKEN }} - name: Update run: sudo apt update From 354bda2efe80c421c38c3fef6bc010c4e077020f Mon Sep 17 00:00:00 2001 From: jonathansumner Date: Thu, 5 Jan 2023 18:13:39 +0000 Subject: [PATCH 08/11] wip: ci test --- .github/workflows/migrations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/migrations.yml b/.github/workflows/migrations.yml index bb0efdecb..85ded8c00 100644 --- a/.github/workflows/migrations.yml +++ b/.github/workflows/migrations.yml @@ -40,7 +40,7 @@ jobs: compose-file: "./ci-compose.yml" - name: Graphile-migrate reset DB - run: . .gm.env && graphile-migrate reset --erase + run: docker compose stop subquery-node && . .gm.env && graphile-migrate reset --erase - name: Run graphile-migrate migrations run: . .gm.env && graphile-migrate migrate From 502aab2c7b6a4abe9181ba072026e60f68dc3bf7 Mon Sep 17 00:00:00 2001 From: jonathansumner Date: Mon, 6 Feb 2023 15:31:57 +0000 Subject: [PATCH 09/11] chore: trigger WIP github actions --- ci-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ci-compose.yml b/ci-compose.yml index f3d6a1ecb..afe6dd1ae 100644 --- a/ci-compose.yml +++ b/ci-compose.yml @@ -3,7 +3,6 @@ version: "3" services: postgres: image: bryanchriswhite/ledger-subquery-postgres:stable -# image: gcr.io/fetch-ai-images/subquery-postgres:863ce7d ports: - 5432:5432 environment: From c4371bd51f11e040f9fe7ea4544906c46c245710 Mon Sep 17 00:00:00 2001 From: jonathansumner Date: Mon, 6 Feb 2023 16:02:44 +0000 Subject: [PATCH 10/11] chore: switch to GCR postgres image --- ci-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-compose.yml b/ci-compose.yml index afe6dd1ae..666adee6e 100644 --- a/ci-compose.yml +++ b/ci-compose.yml @@ -2,7 +2,7 @@ version: "3" services: postgres: - image: bryanchriswhite/ledger-subquery-postgres:stable + image: gcr.io/fetch-ai-images/subquery-postgres:863ce7d ports: - 5432:5432 environment: From b8fa57e5ef00c01d36da8e109d12693883420bfd Mon Sep 17 00:00:00 2001 From: jonathansumner Date: Mon, 6 Feb 2023 16:32:16 +0000 Subject: [PATCH 11/11] chore: switch to stable docker-hub images --- ci-compose.yml | 3 ++- docker-compose.yml | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ci-compose.yml b/ci-compose.yml index 666adee6e..8b1c9e2a6 100644 --- a/ci-compose.yml +++ b/ci-compose.yml @@ -2,7 +2,8 @@ version: "3" services: postgres: - image: gcr.io/fetch-ai-images/subquery-postgres:863ce7d +# image: gcr.io/fetch-ai-images/subquery-postgres:863ce7d + image: jonathansumner/ledger-subquery-postgres:latest ports: - 5432:5432 environment: diff --git a/docker-compose.yml b/docker-compose.yml index deadb6685..85e72c7bd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,9 +2,10 @@ version: "3" services: postgres: - build: - context: ./docker/ - dockerfile: ./plv8.dockerfile +# build: +# context: ./docker/ +# dockerfile: ./plv8.dockerfile + image: jonathansumner/ledger-subquery-postgres:latest ports: - 5432:5432 environment: