diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 000000000..02e05048d
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,54 @@
+name: 'CI'
+
+on:
+ push:
+ branches:
+ - main
+ tags:
+ - '**'
+ pull_request:
+ branches:
+ - '**'
+
+jobs:
+ test:
+ runs-on: ${{ matrix.os }}
+
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, macos-latest, windows-latest]
+ node: ['15', '14'] # Latest + LTS
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v2
+ with:
+ node-version: ${{ matrix.node }}
+
+ - name: Cache node_modules
+ uses: actions/cache@v2
+ env:
+ cache-name: cache-node-modules
+ with:
+ path: ~/.npm
+ key: ${{ runner.os }}-${{ matrix.node }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: ${{ runner.os }}-${{ matrix.node }}-build-${{ env.cache-name }}-
+
+ - run: npm ci
+ - run: npm run apollo:codegen
+ - run: npm run lint
+ # - run: npm test
+ - run: npm run build
+
+ # coverage:
+ # runs-on: ubuntu-latest
+ # steps:
+ # - uses: actions/checkout@v2
+ # - uses: actions/setup-node@v2
+ # - run: npm ci
+ # - uses: paambaati/codeclimate-action@v2.7.5
+ # env:
+ # CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
+ # with:
+ # coverageCommand: npm test
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 000000000..ca5b94331
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,27 @@
+name: 'Deploy'
+
+on:
+ push:
+ branches:
+ - main
+
+jobs:
+ s3:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v2
+ - run: npm ci
+
+ - run: npm run build
+ env:
+ GATSBY_NETWORK: ${{ secrets.GATSBY_NETWORK }}
+ GATSBY_INFURA_PROJECT_ID: ${{ secrets.GATSBY_INFURA_PROJECT_ID }}
+ GATSBY_PORTIS_ID: ${{ secrets.GATSBY_PORTIS_ID }}
+
+ - run: npm run deploy:s3
+ env:
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
diff --git a/.prettierrc b/.prettierrc
index 338a8b9c1..6ddb8fd30 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -2,5 +2,6 @@
"semi": false,
"singleQuote": true,
"trailingComma": "none",
- "tabWidth": 2
+ "tabWidth": 2,
+ "endOfLine": "auto"
}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 79e0ab1aa..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-dist: xenial
-language: node_js
-node_js: node
-
-cache:
- npm: true
-
-addons:
- apt:
- packages:
- - python3
- - python3-pip
-
-before_script:
- # - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- # - chmod +x ./cc-test-reporter
- # - './cc-test-reporter before-build'
-script:
- # will run `npm ci` automatically here
- - npm run apollo:codegen
- - npm run lint
- # - './cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT'
- - npm run build
-
-after_success:
- - pip3 install --user awscli
- - export PATH=$PATH:$HOME/.local/bin
- - npm run deploy
-
-notifications:
- email: false
diff --git a/README.md b/README.md
index cb010b768..1e5ce117a 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
Ocean Marketplace
-[![Build Status](https://travis-ci.com/oceanprotocol/market.svg?token=3psqw6c8KMDqfdGQ2x6d&branch=main)](https://travis-ci.com/oceanprotocol/market)
+[![Build Status](https://github.com/oceanprotocol/market/workflows/CI/badge.svg)](https://github.com/oceanprotocol/market/actions)
[![Netlify Status](https://api.netlify.com/api/v1/badges/c85f4d8b-95e1-4010-95a4-2bacd8b90981/deploy-status)](https://app.netlify.com/sites/market-oceanprotocol/deploys)
[![Maintainability](https://api.codeclimate.com/v1/badges/d114f94f75e6efd2ee71/maintainability)](https://codeclimate.com/repos/5e3933869a31771fd800011c/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/d114f94f75e6efd2ee71/test_coverage)](https://codeclimate.com/repos/5e3933869a31771fd800011c/test_coverage)
diff --git a/package.json b/package.json
index 63ae93c1c..a88cc69ad 100644
--- a/package.json
+++ b/package.json
@@ -18,8 +18,8 @@
"storybook": "start-storybook -p 4000 -c .storybook",
"storybook:build": "build-storybook -c .storybook -o public/storybook",
"write:repoMetadata": "node ./scripts/write-repo-metadata > repo-metadata.json",
- "deploy": "./scripts/deploy.sh",
- "apollo:codegen": "mkdir -p src/@types/apollo/ && apollo client:codegen --target typescript --tsFileExtension='d.ts' --outputFlat './src/@types/apollo/' && find ./src/@types/apollo -type f -exec sed -i -r 's/_([a-z])/\\U\\1/gi' {} \\;",
+ "deploy:s3": "./scripts/deploy-s3.sh",
+ "apollo:codegen": "apollo client:codegen --target typescript --tsFileExtension=d.ts --outputFlat src/@types/apollo/",
"postinstall": "husky install"
},
"dependencies": {
diff --git a/scripts/deploy.sh b/scripts/deploy-s3.sh
similarity index 54%
rename from scripts/deploy.sh
rename to scripts/deploy-s3.sh
index f22167ca0..03c3d59dd 100755
--- a/scripts/deploy.sh
+++ b/scripts/deploy-s3.sh
@@ -5,7 +5,6 @@
# AWS_SECRET_ACCESS_KEY
# AWS_DEFAULT_REGION us-east-1
AWS_S3_BUCKET="www-market"
-AWS_S3_BUCKET_BETA="www-market-beta"
#
set -e;
@@ -16,10 +15,10 @@ function s3sync {
--exclude "*.html" \
--exclude "sw.js" \
--exclude "*page-data.json" \
+ --exclude "*app-data.json" \
--exclude "chunk-map.json" \
--exclude "sitemap.xml" \
--exclude ".iconstats.json" \
- --exclude "humans.txt" \
--exclude "robots.txt" \
--cache-control public,max-age=31536000,immutable \
--delete \
@@ -30,41 +29,14 @@ function s3sync {
--include "*.html" \
--include "sw.js" \
--include "*page-data.json" \
+ --include "*app-data.json" \
--include "chunk-map.json" \
--include "sitemap.xml" \
--include ".iconstats.json" \
- --include "humans.txt" \
--include "robots.txt" \
--cache-control public,max-age=0,must-revalidate \
--delete \
--acl public-read
}
-##
-## check for pull request against master
-##
-if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "main" ]; then
-
- s3sync $AWS_S3_BUCKET_BETA
-
-##
-## check for master push which is no pull request
-##
-elif [ "$TRAVIS_BRANCH" == "main" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] || [ "$TRAVIS" != true ]; then
-
- s3sync $AWS_S3_BUCKET
-
-
- echo "---------------------------------------------"
- echo " ✓ done deployment "
- echo "---------------------------------------------"
-
- exit;
-
-else
-
- echo "---------------------------------------------"
- echo " nothing to deploy "
- echo "---------------------------------------------"
-
-fi
+s3sync $AWS_S3_BUCKET
diff --git a/src/components/molecules/PoolTransactions.tsx b/src/components/molecules/PoolTransactions.tsx
index afdda9e69..91f34d1eb 100644
--- a/src/components/molecules/PoolTransactions.tsx
+++ b/src/components/molecules/PoolTransactions.tsx
@@ -11,7 +11,7 @@ import { formatPrice } from '../atoms/Price/PriceUnit'
import { gql, useQuery } from '@apollo/client'
import {
TransactionHistory,
- TransactionHistoryPoolTransactions
+ TransactionHistory_poolTransactions as TransactionHistoryPoolTransactions
} from '../../@types/apollo/TransactionHistory'
import web3 from 'web3'