Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/argentlabs/argent-x into…
Browse files Browse the repository at this point in the history
… develop
  • Loading branch information
dhruvkelawala committed Nov 11, 2022
2 parents 77108bc + 4b14c6d commit e509881
Show file tree
Hide file tree
Showing 185 changed files with 140,607 additions and 33,498 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Workflow name
name: "Chromatic"

# Event for the workflow
on: push

# List of jobs
jobs:
chromatic-deployment:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: yarn
# 👇 Adds Chromatic as a step in the workflow
- name: Change to storybook directory
run: cd packages/storybook
- name: Publish to Chromatic
uses: chromaui/action@v1
# Chromatic GitHub Action options
with:
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
storybookBaseDir: packages/storybook
43 changes: 33 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
tags:
- "v*.*.*"
branches:
- prerelease/*

env:
FEATURE_PRIVACY_SETTINGS: "true"
Expand Down Expand Up @@ -39,32 +41,53 @@ jobs:
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: yarn build
- run: npm config set "//registry.npmjs.org/:_authToken" "$NPM_ACCESS_TOKEN"
- run: cp Readme.md ./packages/get-starknet/README.md
- run: yarn --cwd packages/get-starknet publish --access public
continue-on-error: true
- run: yarn --cwd packages/sessions publish --access public
continue-on-error: true
- name: Release npm packages
# if flow is triggered by a tag, publish to npm
if: startsWith(github.ref, 'refs/tags/')
run: |
npm config set "//registry.npmjs.org/:_authToken" "$NPM_ACCESS_TOKEN"
cp Readme.md ./packages/get-starknet/README.md
yarn --cwd packages/get-starknet publish --access public || exit 0
yarn --cwd packages/sessions publish --access public || exit 0
- run: yarn --cwd packages/dapp export
- name: Check bundlesize for chrome
run: yarn run bundlewatch
- name: Create chrome zip
run: |
cd packages/extension/dist
zip -r ${{ env.FILENAME }}-chrome.zip ./*
mv ${{ env.FILENAME }}-chrome.zip ../../../
zip -r $(echo "${{ env.FILENAME }}" | tr / -)-chrome.zip ./*
mv $(echo "${{ env.FILENAME }}" | tr / -)-chrome.zip ../../../
cd ../../../
- name: Build Firefox version
run: MANIFEST_VERSION=v2 yarn --cwd packages/extension build
- name: Create firefox zip
run: |
cd packages/extension/dist
zip -r ${{ env.FILENAME }}-firefox.zip ./*
mv ${{ env.FILENAME }}-firefox.zip ../../../
zip -r $(echo "${{ env.FILENAME }}" | tr / -)-firefox.zip ./*
mv $(echo "${{ env.FILENAME }}" | tr / -)-firefox.zip ../../../
cd ../../../
- name: Check bundlesize for firefox
run: yarn run bundlewatch

- name: Upload artifacts for chrome
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v2
with:
name: chrome
path: "*-chrome.zip"
retention-days: 14
if-no-files-found: error
- name: Upload artifacts for firefox
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v2
with:
name: firefox
path: "*-firefox.zip"
retention-days: 14
if-no-files-found: error

- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,11 @@ jobs:
- name: Run e2e tests
run: xvfb-run --auto-servernum yarn test:e2e

- uses: actions/upload-artifact@v3
if: failure()
with:
name: test-results
path: packages/extension/test-results/

- name: Check bundlesize
run: yarn run bundlewatch
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
"format": "prettier --loglevel warn --write \"**/*.{js,jsx,ts,tsx,css,md,yml,json}\"",
"dev": "lerna run dev --parallel",
"dev:ui": "lerna run dev:ui --parallel",
"build-storybook": "lerna run build-storybook --",
"clean": "rm -rf packages/extension/dist packages/get-starket/dist",
"build": "lerna run build --stream",
"build:sourcemaps": "GEN_SOURCE_MAPS=true lerna run build",
"lint": "lerna run lint --stream",
"test": "lerna run test --stream",
"test:watch": "lerna run test:watch --stream",
"test:e2e": "lerna run test:e2e --stream",
"prepare": "yarn --cwd packages/get-starknet build && yarn --cwd packages/sessions build && yarn --cwd packages/ui build && husky install",
"prepare": "yarn --cwd packages/get-starknet build && yarn --cwd packages/sessions build && yarn --cwd packages/ui build && yarn --cwd packages/multicall build && husky install",
"postinstall": "patch-package && lerna run postinstall --stream",
"storybook": "cd packages/storybook && yarn storybook",
"devnet:upgrade-helper": "NODE_NO_WARNINGS=1 ts-node ./scripts/devnet-upgrade-helper.ts"
Expand All @@ -49,7 +50,7 @@
}
]
},
"license": "GPLV3",
"license": "GPL-3.0-only",
"lint-staged": {
"*.{js,jsx,ts,tsx,css,md,yml,json}": "prettier --write",
"*.{ts,tsx}": "eslint --cache --ext .ts,.tsx"
Expand Down
4 changes: 2 additions & 2 deletions packages/dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"next": "^13.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"starknet": "^4.4.0"
"starknet": "^4.9.0"
},
"devDependencies": {
"@types/node": "18.11.9",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"eslint": "8",
"eslint-config-next": "13.0.1",
"eslint-config-next": "13.0.2",
"typescript": "4.8.4"
}
}
Loading

0 comments on commit e509881

Please sign in to comment.