-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #333 from focustree/clean
Clean monorepo
- Loading branch information
Showing
137 changed files
with
3,552 additions
and
68,426 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
source .env | ||
|
||
export STARKNET_RPC="http://0.0.0.0:5050/rpc" | ||
export STARKNET_CHAIN_ID="SN_SEPOLIA" | ||
export SALT="0x42" | ||
|
||
export CAIRO_VERSION=2.6.2 | ||
export SCARB_VERSION=2.6.2 | ||
export STARKNET_DEVNET_VERSION=0.5.0 | ||
export STARKLI_VERSION=0.2.9 | ||
|
||
export STARKNET_ACCOUNT=.starkli/account_0.json | ||
export STARKNET_ACCOUNT_ADDRESS="0x64b48806902a367c8598f4f95c305e8c1a1acba5f082d294a43793113115691" | ||
export STARKNET_PRIVATE_KEY="0x71d7bb07b9a64f6f78ac4c816aff4da9" | ||
export STARKNET_PUBLIC_KEY="0x39d9e6ce352ad4530a0ef5d5a18fd3303c3606a7fa6ac5b620020ad681cc33b" | ||
|
||
export HELLO_CLASS_HASH="0x010ca227019cc2e511a7e6519fc1f547d50e461b330fe5f448476f16c28d677a" | ||
export HELLO_CONTRACT_ADDRESS="0x018b585732af21e763fca1048a2a91c8996b9f477cb2b85310df0a17606433f0" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,168 +9,34 @@ env: | |
WORK_DIR: packages/starknet | ||
|
||
jobs: | ||
dump-context: | ||
runs-on: ubuntu-latest | ||
lint: | ||
steps: | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- name: Dump job context | ||
env: | ||
JOB_CONTEXT: ${{ toJson(job) }} | ||
run: echo "$JOB_CONTEXT" | ||
- name: Dump steps context | ||
env: | ||
STEPS_CONTEXT: ${{ toJson(steps) }} | ||
run: echo "$STEPS_CONTEXT" | ||
- name: Dump runner context | ||
env: | ||
RUNNER_CONTEXT: ${{ toJson(runner) }} | ||
run: echo "$RUNNER_CONTEXT" | ||
- name: Dump strategy context | ||
env: | ||
STRATEGY_CONTEXT: ${{ toJson(strategy) }} | ||
run: echo "$STRATEGY_CONTEXT" | ||
- name: Dump matrix context | ||
env: | ||
MATRIX_CONTEXT: ${{ toJson(matrix) }} | ||
run: echo "$MATRIX_CONTEXT" | ||
- name: Show default environment variables | ||
run: | | ||
echo "The job_id is: $GITHUB_JOB" # reference the default environment variables | ||
echo "The id of this action is: $GITHUB_ACTION" # reference the default environment variables | ||
echo "The run id is: $GITHUB_RUN_ID" | ||
echo "The GitHub Actor's username is: $GITHUB_ACTOR" | ||
echo "GitHub SHA: $GITHUB_SHA" | ||
analyze: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Print $GITHUB_CONTEXT | ||
shell: bash | ||
run: echo "$GITHUB_CONTEXT" | ||
- uses: actions/checkout@v2 | ||
- uses: dart-lang/[email protected] | ||
with: | ||
sdk: stable | ||
- id: install | ||
name: Install dependencies | ||
run: dart pub get | ||
working-directory: ${{ env.WORK_DIR }} | ||
- name: Check formatting | ||
run: dart format --output=none --set-exit-if-changed . | ||
working-directory: ${{ env.WORK_DIR }} | ||
- name: Analyze code | ||
run: dart analyze --fatal-infos | ||
if: always() && steps.install.outcome == 'success' | ||
working-directory: ${{ env.WORK_DIR }} | ||
- uses: bluefireteam/melos-action@v3 | ||
- run: melos bootstrap | ||
- run: melos format:check | ||
- run: melos analyze | ||
|
||
test-unit: | ||
needs: analyze | ||
defaults: | ||
run: | ||
working-directory: ${{ env.WORK_DIR }} | ||
runs-on: ubuntu-latest | ||
needs: lint | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dart-lang/[email protected] | ||
with: | ||
sdk: stable | ||
- id: install | ||
name: Install dependencies | ||
run: dart pub get | ||
- name: Run tests on testnet | ||
run: dart test -t unit | ||
|
||
test-integration-testnet: | ||
needs: analyze | ||
defaults: | ||
run: | ||
working-directory: ${{ env.WORK_DIR }} | ||
runs-on: ubuntu-latest | ||
- uses: bluefireteam/melos-action@v3 | ||
- run: melos bootstrap | ||
- run: melos test:dart:unit | ||
|
||
test-integration: | ||
needs: lint | ||
services: | ||
devnet: | ||
image: shardlabs/starknet-devnet-rs:0.0.5 | ||
ports: | ||
- 5050:5050 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dart-lang/[email protected] | ||
with: | ||
sdk: stable | ||
- id: install | ||
name: Install dependencies | ||
run: dart pub get | ||
- name: Run tests on testnet | ||
run: dart test -t integration-testnet --exclude-tags='rpc-node-bug' | ||
|
||
test-integration-devnet: | ||
needs: analyze | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# | ||
# devnet setup | ||
# | ||
- name: Setup python | ||
id: setup-python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
- name: Load cached env | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install Poetry dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != true | ||
run: poetry install --no-interaction | ||
- name: Start devnet | ||
uses: JarvusInnovations/background-action@v1 | ||
id: start-devnet | ||
with: | ||
run: | | ||
poetry run devnet start & | ||
wait-on: http://localhost:5050/is_alive | ||
tail: true | ||
log-output-resume: stderr | ||
wait-for: 1m | ||
log-output: stderr,stdout | ||
log-output-if: failure | ||
- name: Setup devnet | ||
run: poetry run devnet setup | ||
# | ||
# End of devnet setup | ||
# | ||
- uses: dart-lang/[email protected] | ||
with: | ||
sdk: stable | ||
- id: install | ||
name: Install dependencies | ||
run: dart pub get | ||
working-directory: ${{ env.WORK_DIR }} | ||
- name: Run tests on devnet | ||
env: | ||
NETWORK: devnet | ||
run: dart test -t integration-devnet-040 | ||
working-directory: ${{ env.WORK_DIR }} | ||
|
||
publish: | ||
if: github.event.pull_request.head.repo.fork == false | ||
needs: test-integration-devnet | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
# Only publishes if package version is different from the latest published on pub.dev | ||
# See the docs: https://github.com/marketplace/actions/dart-and-flutter-package-publisher | ||
- name: "Publish package (dry run)" | ||
uses: k-paxian/dart-package-publisher@master | ||
with: | ||
accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }} | ||
refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }} | ||
skipTests: true # Tests have already been run before | ||
dryRunOnly: true | ||
relativePath: ${{ env.WORK_DIR }} | ||
- uses: bluefireteam/melos-action@v3 | ||
- run: melos bootstrap | ||
- run: melos test:dart:integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,4 @@ coverage/ | |
!contracts/build | ||
|
||
.env.* | ||
!.env.katana | ||
!.env.devnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"version": 1, | ||
"variant": { | ||
"type": "open_zeppelin", | ||
"version": 1, | ||
"public_key": "0x39d9e6ce352ad4530a0ef5d5a18fd3303c3606a7fa6ac5b620020ad681cc33b", | ||
"legacy": false | ||
}, | ||
"deployment": { | ||
"status": "deployed", | ||
"class_hash": "0x61dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f", | ||
"address": "0x64b48806902a367c8598f4f95c305e8c1a1acba5f082d294a43793113115691" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.