Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NODE_ENV=development
NET=sepolia
2 changes: 2 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NODE_ENV=production
NET=mainnet
16 changes: 16 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# When running npm run build, the following environment variables are required to be set in the CI/CD environment variables
# NODE_ENV=development
# NET=local
# Suggest to use npm run build:(dev|test|prod) to build the website

# Clone this file to .env with the following values filled in / or set in CI/CD environment variables
## Required for mainnet
STABILITY_API_KEY=
## Required for testnet
STABILITY_TESTNET_API_KEY=
## Required
INFURA_API_KEY=
## Optional
ALCHEMY_API_KEY=
MAGIC_API_KEY=
OKLINK_API_KEY=
2 changes: 2 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NODE_ENV=test
NET=local
3 changes: 0 additions & 3 deletions .env_sample

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ jobs:
name: Lighthouse Desktop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: npm install, build
run: |
npm install
npm run build
npm run build:prod
- name: run Lighthouse CI
run: |
npm install -g @lhci/[email protected]
lhci autorun
- name: upload artifacts
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Lighthouse reports
path: ${{ github.workspace }}/lighthouseReport
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/lint_and_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ jobs:
test:
name: Lint & Test
runs-on: ubuntu-latest
env:
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install Packages
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/synpress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@ jobs:
# https://github.com/drptbl/synpress-setup-example/blob/1d980157ef343de54f786e1115e1da590f1ba1d1/.github/workflows/e2e.yml#L49-L102
name: Synpress e2e Test
runs-on: ubuntu-latest
timeout-minutes: 30
env:
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v2
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # pin@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # pin@v1
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1 # pin@v2
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/testcafe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ jobs:
testcafe:
name: Testcafe e2e Test
runs-on: ubuntu-latest
timeout-minutes: 30
env:
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install Packages
Expand All @@ -27,7 +30,7 @@ jobs:
run: npm run integration:testcafe:ci
- name: Upload Artifact
if: ${{ failure() && steps.testcafe.outcome == 'failure' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: testcafe-fail-screenshots
path: artifacts
Expand Down
13 changes: 9 additions & 4 deletions .testcaferc-dev.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"appCommand": "npm run serve-static",
"src": ["src/**/*.spec.ts"],
"browsers": ["chrome:headless"],
"concurrency": 4
}
"src": [
"src/**/*.spec.ts",
"!src/**/nested-documents.spec.ts"
],
"browsers": [
"chrome"
],
"concurrency": 1
}
15 changes: 15 additions & 0 deletions .testcaferc-dev2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Splitting nested-documents test into a separate file, error with testcafe v3 native automation
// https://github.com/DevExpress/testcafe/issues/8243
// https://stackoverflow.com/questions/76806603/how-to-use-disablenativeautomation-in-testcafe-for-one-test-only
module.exports = {
"appCommand": "npm run serve-static",
"src": [
"src/**/nested-documents.spec.ts"
],
"browsers": [
"chrome"
],
"concurrency": 1,
"disableNativeAutomation": true,
// "debugOnFail": "false"
}
16 changes: 10 additions & 6 deletions .testcaferc-prod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"appCommand": "npm run serve-static",
"src": ["src/**/*.spec.ts"],
"browsers": ["chrome:headless"],
"src": [
"src/**/*.spec.ts",
"!src/**/nested-documents.spec.ts"
],
"browsers": [
"chrome:headless"
],
"concurrency": 4,
"cache": true,
"selectorTimeout": 45000,
Expand All @@ -10,9 +15,8 @@
"ajaxRequestTimeout": 120000,
"pageRequestTimeout": 180000,
"browserInitTimeout": 180000,
"testExecutionTimeout": 60000,
"runExecutionTimeout": 300000,
"disableMultipleWindows": false,
"testExecutionTimeout": 180000,
"runExecutionTimeout": 1000000,
"color": true,
"speed": 1,
"reporter": [
Expand All @@ -34,4 +38,4 @@
"takeOnFails": true,
"fullPage": true
}
}
}
44 changes: 44 additions & 0 deletions .testcaferc-prod2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Splitting nested-documents test into a separate file, error with testcafe v3 native automation
// https://github.com/DevExpress/testcafe/issues/8243
// https://stackoverflow.com/questions/76806603/how-to-use-disablenativeautomation-in-testcafe-for-one-test-only
module.exports = {
"appCommand": "npm run serve-static",
"src": [
"src/**/nested-documents.spec.ts"
],
"browsers": [
"chrome:headless"
],
"concurrency": 1,
"cache": true,
"selectorTimeout": 45000,
"assertionTimeout": 25000,
"pageLoadTimeout": 60000,
"ajaxRequestTimeout": 120000,
"pageRequestTimeout": 180000,
"browserInitTimeout": 180000,
"testExecutionTimeout": 180000,
"runExecutionTimeout": 1000000,
"disableNativeAutomation": true,
"color": true,
"speed": 1,
"reporter": [
{
"name": "spec"
},
{
"name": "spec",
"output": "artifacts/report.json"
}
],
"quarantineMode": {
"successThreshold": 1,
"attemptLimit": 3
},
"screenshots": {
"path": "artifacts/screenshots",
"pathPattern": "${USERAGENT}/test-${TEST_INDEX}-${USERAGENT}-${FILE_INDEX}.png",
"takeOnFails": true,
"fullPage": true
}
}
Loading