Skip to content

Commit

Permalink
chore: bring ui to root
Browse files Browse the repository at this point in the history
  • Loading branch information
tien committed Mar 23, 2022
1 parent a9b1530 commit 07f44d9
Show file tree
Hide file tree
Showing 1,443 changed files with 231 additions and 2,215 deletions.
2 changes: 1 addition & 1 deletion .github/_dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ updates:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: "npm"
directory: "/ui"
directory: "/"
schedule:
interval: "daily"
5 changes: 1 addition & 4 deletions .github/workflows/ci-docker-image-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ jobs:
runs-on: ubuntu-latest
env:
image: "sifchain/frontend"
defaults:
run:
working-directory: ui

steps:
- uses: actions/checkout@v2
Expand All @@ -32,7 +29,7 @@ jobs:
TAG_NAME=$(git tag --points-at HEAD)
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "VITE_APP_VERSION=$(cat ./ui/app/package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
echo "VITE_APP_VERSION=$(cat ./app/package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
echo "VITE_APP_SHA=$GITHUB_SHA" >> $GITHUB_ENV
if [[ $BRANCH_NAME == 'master' ]]
then
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ui

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -38,6 +35,6 @@ jobs:
if: ${{ always() }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./ui/core/coverage
directory: ./core/coverage
flags: ui
verbose: true
7 changes: 2 additions & 5 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ jobs:
runs-on: ubuntu-latest
env:
image: "sifchain/frontend"
defaults:
run:
working-directory: ui

steps:
- uses: actions/checkout@v2
Expand All @@ -32,7 +29,7 @@ jobs:
TAG_NAME=$(git tag --points-at HEAD)
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "VITE_APP_VERSION=$(cat ./ui/app/package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
echo "VITE_APP_VERSION=$(cat ./app/package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
echo "VITE_APP_SHA=$GITHUB_SHA" >> $GITHUB_ENV
if [[ $BRANCH_NAME == 'master' ]]
Expand Down Expand Up @@ -67,7 +64,7 @@ jobs:
if: ${{ always() }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./ui/core/coverage
directory: ./core/coverage
flags: ui
verbose: true

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/pinata-build-deploy-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
TAG_NAME=$(git tag --points-at HEAD)
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "VITE_APP_VERSION=$(cat ./ui/app/package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
echo "VITE_APP_VERSION=$(cat ./app/package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
echo "VITE_APP_SHA=$GITHUB_SHA" >> $GITHUB_ENV
if [[ $BRANCH_NAME == 'master' ]]
Expand All @@ -49,15 +49,14 @@ jobs:
echo $(cat $GITHUB_ENV)
- name: Build App
run: |
cd ui && yarn install --immutable && yarn build --tag $BRANCH_NAME --no-setup
run: yarn install --immutable && yarn build --tag $BRANCH_NAME --no-setup

- name: Deploy App to IPFS/Pinata
id: pinata
uses: anantaramdas/[email protected]
with:
pin-name: "Sifchain ${{ github.sha }}"
path: "./ui/app/dist"
path: "./app/dist"
pinata-api-key: ${{ secrets.PINATA_API_KEY }}
pinata-secret-api-key: ${{ secrets.PINATA_SECRET_KEY }}
verbose: true
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/playwright-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ui

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -44,13 +41,13 @@ jobs:
with:
name: fe-build-artifact-${{ github.sha }}
path: |
./ui/e2e/screenshots
./ui/e2e/logs
./e2e/screenshots
./e2e/logs
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./ui/e2e/coverage
directory: ./e2e/coverage
flags: ui
verbose: true
7 changes: 3 additions & 4 deletions .github/workflows/vercel-deploy-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
echo "VITE_APP_SHA=$GITHUB_SHA" >> $GITHUB_ENV
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "VITE_APP_VERSION=$(cat ./ui/app/package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
echo "VITE_APP_VERSION=$(cat ./app/package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
id: extract_env

Expand All @@ -45,10 +45,10 @@ jobs:
echo "BRANCH_NAME=develop" >> $GITHUB_ENV
fi
echo VITE_APP_SHA=$VITE_APP_SHA >> ./ui/app/.env
echo VITE_APP_SHA=$VITE_APP_SHA >> ./app/.env
- name: Build App
run: cd ./ui && yarn install --immutable
run: yarn install --immutable

- uses: amondnet/vercel-action@v20
with:
Expand All @@ -57,6 +57,5 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.ORG_ID}}
vercel-project-id: ${{ secrets.PROJECT_ID}}
working-directory: .
alias-domains: |
{{BRANCH}}.sifchain.vercel.app
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,17 @@ nohup.out
relayerdb
smart-contracts/*
node_modules
.vercel
.envrc

# Yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Turbo
.turbo
File renamed without changes.
2 changes: 1 addition & 1 deletion ui/.husky/pre-commit → .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

cd ui && yarn lint --quick
yarn lint --quick
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions ui/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
FROM node:17.4.0 as builder

RUN mkdir -p /ui/app
RUN mkdir -p /ui/core
RUN mkdir -p /app
RUN mkdir -p /core

ARG SIFNODE_API
ARG SIFNODE_WS_API
ENV VUE_APP_SIFNODE_API=$SIFNODE_API
ENV VUE_APP_SIFNODE_WS_API=$SIFNODE_WS_API

COPY ./package.json /ui/package.json
COPY ./yarn.lock /ui/yarn.lock
COPY ./app/package.json /ui/app/package.json
COPY ./app/yarn.lock /ui/app/yarn.lock
COPY ./core/package.json /ui/core/package.json
COPY ./core/yarn.lock /ui/core/yarn.lock
COPY ./package.json /package.json
COPY ./yarn.lock /yarn.lock
COPY ./app/package.json /app/package.json
COPY ./app/yarn.lock /app/yarn.lock
COPY ./core/package.json /core/package.json
COPY ./core/yarn.lock /core/yarn.lock
WORKDIR /ui
RUN yarn

Expand All @@ -25,4 +25,4 @@ FROM flashspys/nginx-static
RUN apk update && apk upgrade
RUN rm -rf /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /ui/app/dist /static
COPY --from=builder /app/dist /static
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit 07f44d9

Please sign in to comment.