Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
e1336915
Unverified
Commit
e1336915
authored
Apr 21, 2021
by
Moody Salem
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'main' into v3-main
# Conflicts: # .github/workflows/tests.yaml
parents
6be54afd
9f8719f2
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
86 additions
and
94 deletions
+86
-94
integration-tests.yaml
.github/workflows/integration-tests.yaml
+38
-0
lint.yml
.github/workflows/lint.yml
+4
-17
release.yaml
.github/workflows/release.yaml
+5
-5
tests.yaml
.github/workflows/tests.yaml
+0
-64
unit-tests.yaml
.github/workflows/unit-tests.yaml
+28
-0
README.md
README.md
+4
-3
commands.js
cypress/support/commands.js
+7
-5
No files found.
.github/workflows/integration-tests.yaml
0 → 100644
View file @
e1336915
name
:
Integration Tests
on
:
push
:
branches
:
-
main
pull_request
:
branches
:
-
main
jobs
:
integration-tests
:
name
:
Cypress
runs-on
:
ubuntu-16.04
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v2
-
name
:
Set up node
uses
:
actions/setup-node@v2
with
:
node-version
:
14
registry-url
:
https://registry.npmjs.org
-
name
:
Install dependencies
run
:
yarn install --frozen-lockfile
-
run
:
yarn cypress install
-
run
:
yarn build
env
:
CI
:
false
REACT_APP_NETWORK_URL
:
"
https://mainnet.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847"
-
run
:
yarn integration-test
env
:
CYPRESS_INTEGRATION_TEST_PRIVATE_KEY
:
${{ secrets.CYPRESS_INTEGRATION_TEST_PRIVATE_KEY }}
.github/workflows/lint.yml
View file @
e1336915
...
@@ -14,33 +14,20 @@ jobs:
...
@@ -14,33 +14,20 @@ jobs:
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
steps
:
steps
:
-
name
:
Check
out Git repository
-
name
:
Check
out
uses
:
actions/checkout@v2
uses
:
actions/checkout@v2
-
name
:
Set up node
-
name
:
Set up node
uses
:
actions/setup-node@v
1
uses
:
actions/setup-node@v
2
with
:
with
:
node-version
:
12
node-version
:
14
always-auth
:
true
registry-url
:
https://registry.npmjs.org
registry-url
:
https://registry.npmjs.org
-
name
:
Set output of cache
id
:
yarn-cache
run
:
echo "::set-output name=dir::$(yarn cache dir)"
-
name
:
Node dependency cache
uses
:
actions/cache@v1
with
:
path
:
${{ steps.yarn-cache.outputs.dir }}
key
:
yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys
:
|
yarn-
-
name
:
Install dependencies
-
name
:
Install dependencies
run
:
yarn install --frozen-lockfile
run
:
yarn install --frozen-lockfile
-
name
:
Run linters
-
name
:
Run linters
uses
:
wearerequired/lint-action@
77d70b9a07ecb93bc98dc46dc27d96c4f004d035
uses
:
wearerequired/lint-action@
b98b0918aa71490373d2eca9e8e39a9bc1cc2517
with
:
with
:
github_token
:
${{ secrets.github_token }}
github_token
:
${{ secrets.github_token }}
eslint
:
true
eslint
:
true
...
...
.github/workflows/release.yaml
View file @
e1336915
...
@@ -15,7 +15,7 @@ jobs:
...
@@ -15,7 +15,7 @@ jobs:
changelog
:
${{ steps.github_tag_action.outputs.changelog }}
changelog
:
${{ steps.github_tag_action.outputs.changelog }}
steps
:
steps
:
-
name
:
Checkout
-
name
:
Checkout
uses
:
actions/checkout@v
1
uses
:
actions/checkout@v
2
-
name
:
Bump version and push tag
-
name
:
Bump version and push tag
id
:
github_tag_action
id
:
github_tag_action
...
@@ -31,12 +31,12 @@ jobs:
...
@@ -31,12 +31,12 @@ jobs:
if
:
${{ needs.bump_version.outputs.new_tag !=
null
}}
if
:
${{ needs.bump_version.outputs.new_tag !=
null
}}
steps
:
steps
:
-
name
:
Checkout
-
name
:
Checkout
uses
:
actions/checkout@v
1
uses
:
actions/checkout@v
2
-
uses
:
actions/setup-node@v1
-
name
:
Set up node
uses
:
actions/setup-node@v2
with
:
with
:
node-version
:
'
12'
node-version
:
14
always-auth
:
true
registry-url
:
https://registry.npmjs.org
registry-url
:
https://registry.npmjs.org
-
name
:
Install dependencies
-
name
:
Install dependencies
...
...
.github/workflows/tests.yaml
deleted
100644 → 0
View file @
6be54afd
name
:
Tests
on
:
push
:
branches
:
-
main
pull_request
:
branches
:
-
main
jobs
:
integration-tests
:
name
:
Integration tests
runs-on
:
ubuntu-16.04
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v1
-
uses
:
actions/setup-node@v1
with
:
node-version
:
'
12'
always-auth
:
true
registry-url
:
https://registry.npmjs.org
-
name
:
Get yarn cache directory path
id
:
yarn-cache-dir-path
run
:
echo "::set-output name=dir::$(yarn cache dir)"
-
uses
:
actions/cache@v1
id
:
yarn-cache
# use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with
:
path
:
${{ steps.yarn-cache-dir-path.outputs.dir }}
key
:
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys
:
|
${{ runner.os }}-yarn-
-
run
:
yarn install --frozen-lockfile
-
run
:
yarn cypress install
-
run
:
yarn build
env
:
CI
:
false
REACT_APP_NETWORK_URL
:
'
https://mainnet.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847'
-
run
:
yarn integration-test
unit-tests
:
name
:
Unit tests
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v1
-
uses
:
actions/setup-node@v1
with
:
node-version
:
'
12'
always-auth
:
true
registry-url
:
https://registry.npmjs.org
-
name
:
Get yarn cache directory path
id
:
yarn-cache-dir-path
run
:
echo "::set-output name=dir::$(yarn cache dir)"
-
uses
:
actions/cache@v1
id
:
yarn-cache
# use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with
:
path
:
${{ steps.yarn-cache-dir-path.outputs.dir }}
key
:
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys
:
|
${{ runner.os }}-yarn-
-
run
:
yarn install --frozen-lockfile
-
run
:
yarn test
.github/workflows/unit-tests.yaml
0 → 100644
View file @
e1336915
name
:
Unit Tests
on
:
push
:
branches
:
-
main
pull_request
:
branches
:
-
main
jobs
:
unit-tests
:
name
:
Unit tests
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v2
-
name
:
Set up node
uses
:
actions/setup-node@v2
with
:
node-version
:
14
registry-url
:
https://registry.npmjs.org
-
name
:
Install dependencies
run
:
yarn install --frozen-lockfile
-
name
:
Run unit tests
run
:
yarn test
README.md
View file @
e1336915
# Uniswap Interface
# Uniswap Interface
[

](https://github.com/Uniswap/uniswap-interface/actions?query=workflow%3ALint)
[

](https://github.com/Uniswap/uniswap-interface/actions/workflows/unit-tests.yaml)
[

](https://github.com/Uniswap/uniswap-interface/actions?query=workflow%3ATests)
[

](https://github.com/Uniswap/uniswap-interface/actions/workflows/integration-tests.yaml)
[

](https://prettier.io/)
[

](https://github.com/Uniswap/uniswap-interface/actions/workflows/lint.yml)
[

](https://github.com/Uniswap/uniswap-interface/actions/workflows/release.yaml)
An open source interface for Uniswap -- a protocol for decentralized exchange of Ethereum tokens.
An open source interface for Uniswap -- a protocol for decentralized exchange of Ethereum tokens.
...
...
cypress/support/commands.js
View file @
e1336915
...
@@ -8,13 +8,15 @@ import { JsonRpcProvider } from '@ethersproject/providers'
...
@@ -8,13 +8,15 @@ import { JsonRpcProvider } from '@ethersproject/providers'
import
{
Wallet
}
from
'
@ethersproject/wallet
'
import
{
Wallet
}
from
'
@ethersproject/wallet
'
import
{
Eip1193Bridge
}
from
'
@ethersproject/experimental/lib/eip1193-bridge
'
import
{
Eip1193Bridge
}
from
'
@ethersproject/experimental/lib/eip1193-bridge
'
// never send real ether to this, obviously
const
TEST_PRIVATE_KEY
=
Cypress
.
env
(
'
INTEGRATION_TEST_PRIVATE_KEY
'
)
const
PRIVATE_KEY_TEST_NEVER_USE
=
'
0xad20c82497421e9784f18460ad2fe84f73569068e98e270b3e63743268af5763
'
// address of the above key
// address of the above key
export
const
TEST_ADDRESS_NEVER_USE
=
'
0x0fF2D1eFd7A57B7562b2bf27F3f37899dB27F4a5
'
export
const
TEST_ADDRESS_NEVER_USE
=
new
Wallet
(
TEST_PRIVATE_KEY
).
address
export
const
TEST_ADDRESS_NEVER_USE_SHORTENED
=
'
0x0fF2...F4a5
'
export
const
TEST_ADDRESS_NEVER_USE_SHORTENED
=
`
${
TEST_ADDRESS_NEVER_USE
.
substr
(
0
,
6
)}
...
${
TEST_ADDRESS_NEVER_USE
.
substr
(
-
4
,
4
)}
`
class
CustomizedBridge
extends
Eip1193Bridge
{
class
CustomizedBridge
extends
Eip1193Bridge
{
chainId
=
4
chainId
=
4
...
@@ -77,7 +79,7 @@ Cypress.Commands.overwrite('visit', (original, url, options) => {
...
@@ -77,7 +79,7 @@ Cypress.Commands.overwrite('visit', (original, url, options) => {
options
&&
options
.
onBeforeLoad
&&
options
.
onBeforeLoad
(
win
)
options
&&
options
.
onBeforeLoad
&&
options
.
onBeforeLoad
(
win
)
win
.
localStorage
.
clear
()
win
.
localStorage
.
clear
()
const
provider
=
new
JsonRpcProvider
(
'
https://rinkeby.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847
'
,
4
)
const
provider
=
new
JsonRpcProvider
(
'
https://rinkeby.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847
'
,
4
)
const
signer
=
new
Wallet
(
PRIVATE_KEY_TEST_NEVER_USE
,
provider
)
const
signer
=
new
Wallet
(
TEST_PRIVATE_KEY
,
provider
)
win
.
ethereum
=
new
CustomizedBridge
(
signer
,
provider
)
win
.
ethereum
=
new
CustomizedBridge
(
signer
,
provider
)
},
},
})
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment