Skip to content

Commit

Permalink
Merge branch 'main' into add/mainnet-temp
Browse files Browse the repository at this point in the history
  • Loading branch information
prkpndy authored Nov 18, 2024
2 parents 4977b97 + ea35662 commit 918dcb1
Show file tree
Hide file tree
Showing 75 changed files with 443,568 additions and 135,085 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deno_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Run Tests with Coverage on target branch
run:
DEFAULT_BLOCK_GAS_LIMIT=7000000 STARKNET_NETWORK=http://0.0.0.0:1010
KAKAROT_ADDRESS=0x11c5faab8a76b3caff6e243b8d13059a7fb723a0ca12bbaadde95fb9e501bda
KAKAROT_ADDRESS=0x1d2e513630d8120666fc6e7d52ad0c01479fd99c183baac79fff9135f46e359
deno test --allow-env --allow-read --coverage=cov_profile
- name: Generate Coverage Report on target branch
run: deno coverage cov_profile --html
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Run Tests with Coverage on base branch
run:
DEFAULT_BLOCK_GAS_LIMIT=7000000 STARKNET_NETWORK=http://0.0.0.0:1010
KAKAROT_ADDRESS=0x11c5faab8a76b3caff6e243b8d13059a7fb723a0ca12bbaadde95fb9e501bda
KAKAROT_ADDRESS=0x1d2e513630d8120666fc6e7d52ad0c01479fd99c183baac79fff9135f46e359
deno test --allow-env --allow-read --coverage=cov_profile_main
- name: Generate HTML report from for the base branch
run: deno coverage cov_profile_main --html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
---
name: staging
name: e2e pipeline

on: workflow_dispatch
on:
workflow_dispatch:
inputs:
environment:
description: Environment to run the action on.
required: true
type: choice
options:
- sepolia
- staging
action:
description:
Action to perform on the selected environment. `Deploy` will
upgrade/deploy the Kakarot contracts, while `test` will run the end 2
end tests on the currently deployed stack.
required: true
type: choice
options:
- deploy
- test

jobs:
stage:
Expand All @@ -12,7 +31,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.GH_TOKEN }}
- name: install foundry
uses: foundry-rs/foundry-toolchain@v1
with:
Expand All @@ -25,28 +43,42 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version-file: lib/kakarot/.python-version
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: 0.7.0
- name: Install asdf & tools
uses: asdf-vm/actions/setup@v3
- name: install scarb
run: |
asdf plugin add scarb
asdf install scarb 2.8.3
asdf install scarb 2.6.5
asdf install scarb 0.7.0
- name: Run staging script
env:
KAKAROT_STAGING_PRIVATE_KEY:
${{ secrets.KAKAROT_STAGING_PRIVATE_KEY }}
STARKNET_SEPOLIA_STAGING_PRIVATE_KEY:
${{ secrets.STARKNET_SEPOLIA_STAGING_PRIVATE_KEY }}
STARKNET_SEPOLIA_STAGING_ACCOUNT_ADDRESS:
${{ secrets.STARKNET_SEPOLIA_STAGING_ACCOUNT_ADDRESS }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
run: |
cd scripts
sh upgrade.sh deploy test --staging
sh e2e_pipeline.sh ${{ github.event.inputs.action }} --${{ github.event.inputs.environment }}
- name: Check diff in deployments
run: |
cd lib/kakarot
set +e
git diff --no-patch --exit-code -- deployments/kakarot-staging/
git diff --no-patch --exit-code -- deployments/
has_diff=$?
set -e
echo "has_diff=$has_diff" >> $GITHUB_ENV
- uses: actions/create-github-app-token@v1
id: github_token
with:
app-id: ${{ secrets.KAKAROT_BOT_APP_ID }}
private-key: ${{ secrets.KAKAROT_BOT_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Create PR for deployment updates
if: ${{ env.has_diff == 1 }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ steps.github_token.outputs.token }}
run: |
set +e
cd lib/kakarot
Expand Down
4 changes: 2 additions & 2 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ lint:
actions:
disabled:
- trunk-announce
- trunk-check-pre-push
- trunk-fmt-pre-commit
enabled:
- trunk-upgrade-available
- trunk-fmt-pre-commit
- trunk-check-pre-push
Loading

0 comments on commit 918dcb1

Please sign in to comment.