Skip to content

Commit

Permalink
Merge pull request #361 from storyprotocol/origin/dev-bpolania/workflows
Browse files Browse the repository at this point in the history
SDK Workflows Update
  • Loading branch information
bpolania authored Dec 11, 2024
2 parents a5162fe + 5da3cf9 commit 56c2c9c
Show file tree
Hide file tree
Showing 5 changed files with 7,953 additions and 6,236 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr-external.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Workflow for External PRs
name: Workflow for External PRs with Unit Tests

on:
pull_request_target:
Expand All @@ -21,10 +21,10 @@ jobs:
Timestamp_PR_APPROVED:
needs: [authorize]
uses: storyprotocol/gha-workflows/.github/workflows/reusable-timestamp.yml@main

build_and_test:
needs: [authorize, Timestamp_PR_APPROVED]
uses: storyprotocol/gha-workflows/.github/workflows/reusable-build-test-workflow.yml@main
uses: storyprotocol/gha-workflows/.github/workflows/reusable-build-unit-test-workflow.yml@main
with:
sha: ${{ github.event.pull_request.head.sha }}
ENVIRONMENT: "beta-sepolia"
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/pr-internal.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
name: Workflow for internal PRs
name: Conditional Workflow

on:
push:
pull_request:
branches:
- main
- dev

pull_request:
push:
branches:
- main
- dev

jobs:
Timestamp:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
uses: storyprotocol/gha-workflows/.github/workflows/reusable-timestamp.yml@main

build_and_test:
pr_build_and_test:
if: github.event_name == 'pull_request'
needs: [Timestamp]
uses: storyprotocol/gha-workflows/.github/workflows/reusable-build-test-workflow.yml@main
uses: storyprotocol/gha-workflows/.github/workflows/reusable-build-unit-test-workflow.yml@main
with:
sha: ${{ github.event.pull_request.head.sha }}
ENVIRONMENT: "beta-sepolia"
secrets:
WALLET_PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }}
TEST_WALLET_ADDRESS: ${{ secrets.TEST_WALLET_ADDRESS }}

push_build_and_test:
if: github.event_name == 'push'
uses: storyprotocol/gha-workflows/.github/workflows/reusable-build-integration-test-workflow.yml@main
with:
sha: ${{ github.sha }}
ENVIRONMENT: "beta-sepolia"
secrets:
WALLET_PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }}
TEST_WALLET_ADDRESS: ${{ secrets.TEST_WALLET_ADDRESS }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"lint": "turbo run lint",
"fix": "turbo run fix",
"test": "turbo run test --no-cache --concurrency=1",
"test:integration": "turbo run test:integration --no-cache",
"prepare": "husky install"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 56c2c9c

Please sign in to comment.