-
Notifications
You must be signed in to change notification settings - Fork 273
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 #2043 from argentlabs/release/v5.4
Release v5.4
- Loading branch information
Showing
899 changed files
with
36,458 additions
and
19,273 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 |
---|---|---|
|
@@ -5,23 +5,31 @@ on: | |
- develop | ||
pull_request: | ||
|
||
env: | ||
FEATURE_PRIVACY_SETTINGS: "true" | ||
FEATURE_EXPERIMENTAL_SETTINGS: "true" | ||
FEATURE_BANXA: "true" | ||
FEATURE_LAYERSWAP: "true" | ||
FEATURE_ORBITER: "true" | ||
FEATURE_VERIFIED_DAPPS: "true" | ||
FEATURE_ARGENT_SHIELD: "true" | ||
ARGENT_SHIELD_NETWORK_ID: "mainnet-alpha" | ||
FEATURE_MULTISIG: "false" | ||
|
||
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
RAMP_API_KEY: ${{ secrets.RAMP_API_KEY }} | ||
SAFE_ENV_VARS: true | ||
ARGENT_API_BASE_URL: ${{ vars.ARGENT_API_BASE_URL }} | ||
ARGENT_TRANSACTION_REVIEW_API_BASE_URL: ${{ vars.ARGENT_TRANSACTION_REVIEW_API_BASE_URL }} | ||
ARGENT_X_STATUS_URL: ${{ vars.ARGENT_X_STATUS_URL }} | ||
ARGENT_EXPLORER_BASE_URL: ${{ vars.ARGENT_EXPLORER_BASE_URL }} | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
FEATURE_PRIVACY_SETTINGS: "true" | ||
FEATURE_EXPERIMENTAL_SETTINGS: "true" | ||
FEATURE_BANXA: "true" | ||
FEATURE_LAYERSWAP: "true" | ||
FEATURE_ORBITER: "true" | ||
FEATURE_VERIFIED_DAPPS: "false" | ||
ARGENT_API_BASE_URL: ${{ vars.ARGENT_API_BASE_URL }} | ||
ARGENT_TRANSACTION_REVIEW_API_BASE_URL: ${{ vars.ARGENT_TRANSACTION_REVIEW_API_BASE_URL }} | ||
ARGENT_X_STATUS_URL: ${{ vars.ARGENT_X_STATUS_URL }} | ||
ARGENT_EXPLORER_BASE_URL: ${{ vars.ARGENT_EXPLORER_BASE_URL }} | ||
UPLOAD_SENTRY_SOURCEMAPS: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
|
@@ -35,12 +43,28 @@ jobs: | |
- name: Build extension | ||
run: yarn lerna run --scope @argent-x/extension build | ||
|
||
- name: Check bundlesize for Chrome | ||
run: yarn run bundlewatch | ||
|
||
- name: Cache build | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./* | ||
key: ${{ github.sha }} | ||
|
||
- name: Set filename prefix | ||
run: echo "FILENAME_PREFIX=$(echo argent-extension-${{ github.ref_name }} | tr / -)" >> $GITHUB_ENV | ||
|
||
- name: Create chrome zip | ||
run: (cd ./packages/extension/dist && zip -r "../../../${{ env.FILENAME_PREFIX }}-chrome.zip" .) | ||
|
||
- name: Upload Chrome extension | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.FILENAME_PREFIX }}-chrome.zip | ||
path: "*-chrome.zip" | ||
retention-days: 5 | ||
|
||
test-unit: | ||
runs-on: ubuntu-latest | ||
needs: [setup] | ||
|
@@ -57,6 +81,7 @@ jobs: | |
with: | ||
node-version: "16" | ||
cache: "yarn" | ||
fetch-depth: 0 | ||
|
||
- name: Restore cached build | ||
uses: actions/cache@v3 | ||
|
@@ -69,11 +94,23 @@ jobs: | |
|
||
- name: Run tests | ||
run: yarn test:ci | ||
- name: SonarCloud Scan | ||
# TODO replace with master as soon as sonarcloud fixes the issue with action https://community.sonarsource.com/t/sonarsource-sonarcloud-github-action-failing-with-node-js-12-error/89664/2 | ||
uses: SonarSource/[email protected] | ||
with: | ||
projectBaseDir: ./packages/extension | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} | ||
|
||
test-e2e: | ||
runs-on: ubuntu-latest | ||
needs: [setup] | ||
|
||
strategy: | ||
matrix: | ||
project: [chromium] | ||
shardIndex: [1, 2, 3, 4, 5, 6, 7, 8] | ||
shardTotal: [8] | ||
services: | ||
devnet: | ||
image: argentlabs-argent-x.jfrog.io/e2e-starknet-devnet:latest | ||
|
@@ -85,7 +122,6 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16" | ||
|
@@ -101,21 +137,22 @@ jobs: | |
run: npx playwright install chromium | ||
|
||
- name: Run e2e tests | ||
run: xvfb-run --auto-servernum yarn test:e2e | ||
run: xvfb-run --auto-servernum yarn test:e2e --project=${{ matrix.project }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: test-results | ||
path: | | ||
packages/extension/test-results/ | ||
packages/extension/e2e/artifacts/playwright/ | ||
packages/extension/e2e/artifacts/reports/ | ||
packages/test-results/ | ||
packages/e2e/artifacts/playwright/ | ||
packages/e2e/artifacts/reports/ | ||
retention-days: 5 | ||
|
||
sonar: | ||
build_firefox_extension: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'pull_request' }} # Run only for pull requests | ||
needs: [setup] | ||
|
||
steps: | ||
|
@@ -131,19 +168,35 @@ jobs: | |
path: ./* | ||
key: ${{ github.sha }} | ||
|
||
- name: SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} | ||
- name: Build Firefox version | ||
run: MANIFEST_VERSION=v2 yarn --cwd packages/extension build | ||
|
||
- name: Set filename prefix | ||
run: echo "FILENAME_PREFIX=$(echo argent-extension-${{ github.ref_name }} | tr / -)" >> $GITHUB_ENV | ||
|
||
- name: Create firefox zip | ||
run: (cd ./packages/extension/dist && zip -r "../../../${{ env.FILENAME_PREFIX }}-firefox.zip" .) | ||
|
||
- name: Check bundlesize for firefox | ||
run: yarn run bundlewatch | ||
|
||
- name: Upload artifacts for firefox | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.FILENAME_PREFIX }}-firefox.zip | ||
path: "*-firefox.zip" | ||
retention-days: 5 | ||
|
||
artifacts: | ||
create_sentry_release: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'pull_request' }} # Run only for pull requests | ||
needs: [setup, test-unit, test-e2e] | ||
if: ${{ github.event_name == 'pull_request' && github.actor != 'dependabot[bot]'}} # Run only for pull requests and if not triggered by dependabot | ||
needs: [setup] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16" | ||
|
@@ -155,34 +208,43 @@ jobs: | |
path: ./* | ||
key: ${{ github.sha }} | ||
|
||
- name: Set filename prefix | ||
run: echo "FILENAME_PREFIX=$(echo argent-extension-${{ github.ref_name }} | tr / -)" >> $GITHUB_ENV | ||
- name: Build extension | ||
run: yarn lerna run --scope @argent-x/extension build | ||
|
||
- name: Create chrome zip | ||
run: (cd ./packages/extension/dist && zip -r "../../../${{ env.FILENAME_PREFIX }}-chrome.zip" .) | ||
- name: Get Extension version | ||
id: package-version | ||
run: | | ||
PACKAGE_VERSION=$(cat ./packages/extension/package.json | jq -r '.version') | ||
echo "current-version=${PACKAGE_VERSION}" >> $GITHUB_OUTPUT | ||
- name: Upload artifacts for chrome | ||
uses: actions/upload-artifact@v3 | ||
- name: Check sourcemaps | ||
run: | | ||
ls -l ./packages/extension | ||
if [ ! -d "./packages/extension/sourcemaps" ]; then | ||
echo "No sourcemaps found" | ||
exit 0 | ||
fi | ||
- name: Create Sentry release | ||
uses: getsentry/action-release@v1 | ||
env: | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | ||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | ||
SENTRY_LOG_LEVEL: debug | ||
with: | ||
name: ${{ env.FILENAME_PREFIX }}-chrome.zip | ||
path: "*-chrome.zip" | ||
retention-days: 5 | ||
|
||
- name: Build Firefox version | ||
run: MANIFEST_VERSION=v2 yarn --cwd packages/extension build | ||
environment: staging | ||
sourcemaps: "./packages/extension/sourcemaps" | ||
version: ${{ steps.package-version.outputs.current-version }}-rc__${{ github.sha }} | ||
ignore_missing: true | ||
|
||
- name: Create firefox zip | ||
run: (cd ./packages/extension/dist && zip -r "../../../${{ env.FILENAME_PREFIX }}-firefox.zip" .) | ||
|
||
- name: Check bundlesize for firefox | ||
run: yarn run bundlewatch | ||
add_pr_comments: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'pull_request' && github.actor != 'dependabot[bot]'}} # Run only for pull requests and if not triggered by dependabot | ||
needs: [build_firefox_extension, test-unit, test-e2e] | ||
|
||
- name: Upload artifacts for firefox | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.FILENAME_PREFIX }}-firefox.zip | ||
path: "*-firefox.zip" | ||
retention-days: 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set GHA_BRANCH | ||
run: echo "GHA_BRANCH=$(echo $GITHUB_REF | awk -F / '{print $3}')" >> $GITHUB_ENV | ||
|
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
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 |
---|---|---|
|
@@ -15,3 +15,5 @@ sourcemaps | |
coverage | ||
*.tsbuildinfo | ||
license-report.md | ||
|
||
**/.next |
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,3 @@ | ||
{ | ||
"recommendations": ["svelte.svelte-vscode"] | ||
} |
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
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
Oops, something went wrong.