Skip to content

Commit

Permalink
Release v5.3.20
Browse files Browse the repository at this point in the history
  • Loading branch information
gergold committed Apr 11, 2023
1 parent 428af80 commit e2f14bf
Show file tree
Hide file tree
Showing 59 changed files with 513 additions and 484 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/gh-pages.yml

This file was deleted.

198 changes: 198 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
name: Run all tests
on:
push:
branches:
- develop
pull_request:
branches:
- main
- develop

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
with:
node-version: "16"
cache: "yarn"

- name: Setup project
run: yarn setup

- name: Build extension
run: yarn lerna run --scope @argent-x/extension build

- name: Cache build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}

test-unit:
runs-on: ubuntu-latest
needs: [setup]

services:
devnet:
image: shardlabs/starknet-devnet:latest-seed0
ports:
- 5050:5050

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"

- name: Restore cached build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}

- name: Lint
run: yarn lint

- name: Run tests
run: yarn test:ci

test-e2e:
runs-on: ubuntu-latest
needs: [setup]

services:
devnet:
image: argentlabs-argent-x.jfrog.io/e2e-starknet-devnet:latest
ports:
- 5050:5050
credentials:
username: ${{ secrets.JFROG_USERNAME }}
password: ${{ secrets.JFROG_PASSWORD }}

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"

- name: Restore cached build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}

- name: Install Playwright Browsers
run: npx playwright install chromium

- name: Run e2e tests
run: xvfb-run --auto-servernum yarn test:e2e

- 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/
retention-days: 5

sonar:
runs-on: ubuntu-latest
needs: [setup]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"

- name: Restore cached build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}

artifacts:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }} # Run only for pull requests
needs: [setup, test-unit, test-e2e]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"

- name: Restore cached 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 artifacts for chrome
uses: actions/upload-artifact@v3
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

- 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

- name: Set GHA_BRANCH
run: echo "GHA_BRANCH=$(echo $GITHUB_REF | awk -F / '{print $3}')" >> $GITHUB_ENV

- name: Comment PR
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr comment ${{ env.GHA_BRANCH }} --body "[Builds for local testing](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
35 changes: 16 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
tags:
- "v*.*.*"
branches:
- prerelease/*

env:
FEATURE_PRIVACY_SETTINGS: "true"
Expand All @@ -24,26 +22,26 @@ jobs:
contents: write
env:
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
FILENAME: argent-extension-${{ github.ref_name }}
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 }}
FILENAME: argent-extension-${{ github.ref_name }}
UPLOAD_SENTRY_SOURCEMAPS: true
ARGENT_API_BASE_URL: ${{ secrets.ARGENT_API_BASE_URL }}
ARGENT_TRANSACTION_REVIEW_API_BASE_URL: ${{ secrets.ARGENT_TRANSACTION_REVIEW_API_BASE_URL }}
ARGENT_X_STATUS_URL: ${{ secrets.ARGENT_X_STATUS_URL }}
ARGENT_EXPLORER_BASE_URL: ${{ secrets.ARGENT_EXPLORER_BASE_URL }}
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 }}
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"
- run: yarn setup
- run: yarn build

- name: Release npm packages
# if flow is triggered by a tag, publish to npm
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -52,23 +50,21 @@ jobs:
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 $(echo "${{ env.FILENAME }}" | tr / -)-chrome.zip ./*
mv $(echo "${{ env.FILENAME }}" | tr / -)-chrome.zip ../../../
cd ../../../
run: (cd ./packages/extension/dist && zip -r "../../../${{ env.FILENAME }}-chrome.zip" .)

- name: Build Firefox version
run: MANIFEST_VERSION=v2 yarn --cwd packages/extension build

- name: Create firefox zip
run: |
cd packages/extension/dist
zip -r $(echo "${{ env.FILENAME }}" | tr / -)-firefox.zip ./*
mv $(echo "${{ env.FILENAME }}" | tr / -)-firefox.zip ../../../
cd ../../../
run: (cd ./packages/extension/dist && zip -r "../../../${{ env.FILENAME }}-firefox.zip" .)

- name: Check bundlesize for firefox
run: yarn run bundlewatch

Expand All @@ -80,6 +76,7 @@ jobs:
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@v3
Expand Down
Loading

0 comments on commit e2f14bf

Please sign in to comment.