Skip to content

Commit

Permalink
Clean up CI and assets (#155)
Browse files Browse the repository at this point in the history
- Removed back button
- Swapped out large pngs for svgs
- Crushed other pngs
- Cleaned up yml for CI
  • Loading branch information
wilwade authored Mar 21, 2024
1 parent d263d30 commit 9fa61ce
Show file tree
Hide file tree
Showing 19 changed files with 298 additions and 46 deletions.
71 changes: 36 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,65 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Svelte TypeScript CI

on:
push:
branches: [ "main", "feat/svelte-app" ]
branches: ['main']
pull_request:
branches: [ "main", "feat/svelte-app" ]
branches: ['main']

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install Dependencies
run: npm ci

- name: Build
env:
BASE_PATH: ''
run: |
npm run build
touch build/.nojekyll
- name: Build
env:
BASE_PATH: ''
run: |
npm run build
touch build/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./build

- name: CI Unit Tests
run: npm run test:ci
- name: CI Unit Tests
run: npm run test:ci

e2e:
runs-on: ubuntu-latest
services:
frequency-instant:
image: "frequencychain/instant-seal-node:latest"
image: 'frequencychain/instant-seal-node:latest'
ports:
- "9944:9944" # ws and rpc port
- '9944:9944' # ws and rpc port

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install Dependencies
run: npm ci
- name: "E2E Tests"
run: npm run test:e2e
- name: Install Dependencies
run: npm ci
- name: 'E2E Tests'
run: npm run test:e2e

# Preview PRs when actions/deploy-pages preview option is in public
# https://github.com/actions/deploy-pages/issues/180
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Deploy to GitHub Pages

on:
release:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # ex. v1.0.0
- 'v[0-9]+.[0-9]+.[0-9]+' # ex. v1.0.0
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -16,7 +17,7 @@ permissions:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "deploy-pages"
group: 'deploy-pages'
cancel-in-progress: false

jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Prettier checks
on:
push:
Expand Down
6 changes: 3 additions & 3 deletions src/components/Header.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script>
import logo from '$lib/assets/logo.png';
import Logo from './Logo.svelte';
import ConnectionStatus from './ConnectionStatus.svelte';
</script>

<header class="mb-14 flex items-start justify-between">
<div>
<img alt="The project logo" src={logo} class="h-11" />
<div class="pt-3">
<div class="max-w-56 pb-1 pl-3"><Logo /></div>
<p class="text-md pl-3 font-semibold tracking-wider">Provider Dashboard</p>
</div>
<ConnectionStatus />
Expand Down
6 changes: 6 additions & 0 deletions src/components/Logo.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<svg width="100%" viewBox="0 0 216 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M0 0.654808V31.3416H5.36345V21.7823L16.1391 17.1452L15.9972 11.6618L5.40781 16.2053V5.76408H19.0804V0.654808H0ZM26.0808 5.75963H33.2676C35.601 5.75963 37.5131 6.93115 37.5131 9.46129C37.5131 11.9914 35.601 13.2075 33.2676 13.2075H26.0808V5.76408V5.75963ZM20.6686 0.654808V31.3416H26.0808V23.8002L42.8765 31.3416V25.4395L26.5466 18.3658H33.1256C38.3515 18.3658 42.8765 14.9937 42.8765 9.51029C42.8765 4.02684 38.3515 0.654808 33.1256 0.654808H20.6686ZM44.5091 0.654808V31.3416H63.5451V26.1878H49.8725V18.5039H63.5451V13.399H49.8725V5.76408H63.5451V0.654808H44.5091ZM114.819 0.654808V21.6442C114.819 24.7846 112.535 26.9362 109.456 26.9362C106.377 26.9362 104.093 24.7802 104.093 21.6442V0.654808H98.7291V21.5507C98.7291 27.7335 103.534 31.9964 109.46 31.9964C115.387 31.9964 120.192 27.7335 120.192 21.5507V0.654808H114.828H114.819ZM121.82 0.654808V31.3416H140.856V26.1878H127.183V18.5039H140.856V13.399H127.183V5.76408H140.856V0.654808H121.82ZM159.519 0.654808V21.3636L148.322 0.654808H142.488V31.3416H147.759V10.6818L159.005 31.3416H164.79V0.654808H159.519ZM209.396 0.654808L205.151 12.1785L200.67 0.654808H194.743L207.715 31.3416H213.313L207.901 18.5529L215.088 0.703808H209.396V0.654808ZM70.3104 15.9782C70.3104 9.98246 75.1637 5.06027 81.1837 5.06027C87.2037 5.06027 92.057 9.93346 92.057 15.9782C92.057 17.898 91.5912 19.7734 90.6108 21.4616L78.5264 13.9648V20.054L87.0174 25.2078C85.2429 26.2858 83.2377 26.8961 81.1393 26.8961C75.2125 26.9451 70.3636 22.1654 70.3148 16.2143V15.9782M81.1349 1.99158e-06C72.3644 0.0490011 65.2264 7.21624 65.2708 16.0227C65.3196 24.8292 72.4576 31.9964 81.2281 31.9519C85.0521 31.9519 88.7386 30.5443 91.6311 28.0186L97.0433 31.2971V25.4395L94.8962 24.1298C96.298 21.6487 97.0433 18.8379 97.0433 15.9782C97.1409 7.21624 90.0961 0.0490011 81.37 1.99158e-06C81.2768 1.99158e-06 81.2281 1.99158e-06 81.1349 1.99158e-06ZM182.384 1.99158e-06C173.613 1.99158e-06 166.427 7.12269 166.427 15.9737C166.427 24.8247 173.52 31.9964 182.335 31.9964C187.419 31.9964 192.179 29.6088 195.165 25.484L191.434 21.7378C189.615 25.0163 186.115 27.0297 182.384 26.9362C176.226 26.9362 171.608 22.2055 171.608 16.0183C171.608 9.83101 176.275 5.05582 182.384 5.05582C186.115 4.96228 189.615 6.9757 191.434 10.3032L195.165 6.55698C192.179 2.34305 187.419 -0.0445427 182.384 1.99158e-06Z"
fill="currentColor"
/>
</svg>
2 changes: 0 additions & 2 deletions src/components/Nav.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script lang="ts">
import { logout } from '$lib/stores';
import { isLoggedIn } from '$lib/stores';
import iconLogo from '$lib/assets/icon-logo.png';
import NavItem from '$components/NavItem.svelte';
$: url = window.location.pathname;
Expand All @@ -13,7 +12,6 @@
</script>

<div class="fixed flex h-screen w-[126px] min-w-[126px] flex-col items-center justify-center bg-bg-black">
<img alt="iconLogo" src={iconLogo} class="absolute left-6 top-7 w-[57px]" />
<div class="flex w-[100%] flex-col">
<NavItem href="/" isActive={url === '/'} onClick={() => (url = '/')}>Home</NavItem>
{#if $isLoggedIn === true}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProviderLogin.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
<Button id="request-2b-provider-btn" title="Become a Provider" action={pageContent.becomeProvider} />
</BlockSection>

<HowToTransact additionalStyles="mt-24 text-xs gap-1" />
<HowToTransact additionalStyles="mt-12 text-xs gap-1" />
</div>
Loading

0 comments on commit 9fa61ce

Please sign in to comment.