Skip to content

Commit

Permalink
CI Pre Release Draft Fix + CI Canary Cleanup (#843)
Browse files Browse the repository at this point in the history
* cleanup + fix logic of build files

* generate dev schema + SUBGRAPH_RELEASE_TAG: dev

* only run on deploy to v1 endpoints

* properly select subgraph-release

* file rename + refactor

* trigger ci.feature on any workflow edits given requirement of ci feature workflow for merge
  • Loading branch information
0xdavinchee authored May 23, 2022
1 parent d9c12aa commit 7b94c3f
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
- ".github/workflows/ci.canary.yml"
- "codecov.yml"
- ".github/workflows/call.setup-deploy-and-test-local-subgraph.yml"
- ".github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml"

jobs:
essential-build-and-test:
Expand Down Expand Up @@ -51,10 +50,12 @@ jobs:
run: |
yarn install --frozen-lockfile
yarn lint
yarn --cwd packages/sdk-core generate-graphql-schema:dev
yarn build
yarn test
env:
POLYGON_MAINNET_PROVIDER_URL: ${{ secrets.POLYGON_MAINNET_PROVIDER_URL }}
SUBGRAPH_RELEASE_TAG: dev

test-subgraph:
uses: superfluid-finance/protocol-monorepo/.github/workflows/call.setup-deploy-and-test-local-subgraph.yml@dev
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/ci.feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ on:
pull_request:
paths:
- "packages/**"
- ".github/workflows/ci.feature.yml"
- ".github/workflows/call.setup-deploy-and-test-local-subgraph.yml"
- ".github/workflows/call.test-sdk-core.yml"
- ".github/workflows/**"

jobs:
check:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
name: CI | Pre-Release Draft SDK Core-Subgraph Integration Test
name: CI | Pre-Release Draft SDK Core Integration Test

on:
pull_request:
branches:
- "release-subgraph-v1"
- "release-sdk-core-stable"
paths:
- "packages/subgraph/**"
- "packages/sdk-core/**"
- ".github/workflows/ci.pre-release-draft-test-sdk-core-subgraph-integration.yml"
- "packages/subgraph/**"
- ".github/workflows/ci.pre-release-sdk-core.yml"
- ".github/workflows/call.setup-deploy-and-test-local-subgraph.yml"
- ".github/workflows/call.check-subgraph-indexing-statuses.yml"
- ".github/workflows/call.test-sdk-core.yml"
- ".github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml"

jobs:
show-contexts:
Expand All @@ -36,6 +34,8 @@ jobs:
name: Build and Test Subgraph (Release Branch)
with:
local-subgraph-url: http://localhost:8000/subgraphs/name/superfluid-test
# we can use v1 endpoint here because v1 endpoints must be deployed if
# we want to merge
subgraph-release: v1

# ensure subgraph indexing is complete on all v1 endpoints before allowing sdk-core release
Expand All @@ -51,13 +51,5 @@ jobs:
uses: ./.github/workflows/call.test-sdk-core.yml
name: Build and Test SDK-Core (Release branch)
if: github.base_ref == 'release-sdk-core-stable'
with:
subgraph-release: v1

# build and test live subgraph with previous sdk-core releases
build-and-test-live-subgraph-previous-releases:
uses: ./.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml
name: Build and test current subgraph release with previous sdk-core versions
if: github.base_ref == 'release-subgraph-v1'
with:
subgraph-release: v1
49 changes: 49 additions & 0 deletions .github/workflows/ci.pre-release-subgraph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI | Pre-Release Draft Subgraph Integration Test

on:
pull_request:
branches:
- "release-subgraph-v1"
paths:
- "packages/sdk-core/**"
- "packages/subgraph/**"
- ".github/workflows/ci.pre-release-subgraph.yml"
- ".github/workflows/call.setup-deploy-and-test-local-subgraph.yml"
- ".github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml"

jobs:
show-contexts:
name: Show Contexts

runs-on: ubuntu-latest

steps:
- name: Show contexts
run: |
echo github.event_name: ${{ github.event_name }}
echo github.sha: ${{ github.sha }}
echo github.repository: ${{ github.repository }}
echo github.ref: ${{ github.ref }}
echo github.head_ref: ${{ github.head_ref }}
echo github.base_ref: ${{ github.base_ref }}
# build and run sdk-core tests with local subgraph
build-and-test-local-subgraph:
uses: ./.github/workflows/call.setup-deploy-and-test-local-subgraph.yml
name: Build and Test Subgraph (Release Branch)
with:
local-subgraph-url: http://localhost:8000/subgraphs/name/superfluid-test
# we must use dev endpoint here because v1 endpoints won't be deployed yet
# we want to test what is to be deployed
subgraph-release: dev

# build and test live subgraph with previous sdk-core releases
build-and-test-live-subgraph-previous-releases:
uses: ./.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml
name: Build and test current subgraph release with previous sdk-core versions
if: github.base_ref == 'release-subgraph-v1'
with:
# we check with dev endpoint here because v1 endpoints won't be deployed yet
# we want to check here if it's safe to merge what we have in dev
# endpoints to v1 endpoints (backwards compatible)
subgraph-release: dev
5 changes: 4 additions & 1 deletion .github/workflows/handler.deploy-subgraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ jobs:
build-and-test-tbd-subgraph-with-previous-release:
uses: ./.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml
name: Build and Test to be deployed Subgraph with previous SDK-Core Versions
# we will run this job again when deploying to v1 endpoints just in case
# it is repetitive, but more important here than for dev endpoints
if: ${{ github.event.inputs.release_branch == "v1" }}
with:
subgraph-release: ${{ github.events.inputs.release_branch }}
subgraph-release: dev
local-subgraph-url: http://localhost:8000/subgraphs/name/superfluid-test

deploy-subgraph:
Expand Down

0 comments on commit 7b94c3f

Please sign in to comment.