Skip to content

Commit

Permalink
v2: add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser committed Aug 29, 2023
1 parent eaa5848 commit 78481ab
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 21 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 🔨 Build

on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master

jobs:
build:
name: App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn

- name: Build App
run: |
yarn install --frozen-lockfile
yarn build
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 📝 Lint

on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
frontend:
name: App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn

- name: Install Dependencies and Check Formatting
run: |
yarn install --frozen-lockfile
yarn lint
32 changes: 32 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 🧪 Tests

on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master

jobs:
frontend:
name: App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn

- name: Install NPM Dependencies
run: yarn install --frozen-lockfile

- name: Cypress run
uses: cypress-io/github-action@v5
with:
start: yarn dev
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
"ts-node": "^10.9.1",
"tslib": "^2.4.0",
"typescript": "^4.6.4",
"vite": "^3.1.0",
"vite-plugin-static-copy": "^0.17.0"
"vite": "^3.1.0"
},
"dependencies": {
"@shoelace-style/shoelace": "^2.5.2",
Expand Down
20 changes: 1 addition & 19 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { svelte } from "@sveltejs/vite-plugin-svelte";
import { fileURLToPath } from "url";
import { resolve } from "path";
import basicSsl from "@vitejs/plugin-basic-ssl";
import { viteStaticCopy } from "vite-plugin-static-copy";
import { normalizePath } from "vite";

const root = resolve(__dirname, "src");
const outDir = resolve(__dirname, "dist");
Expand All @@ -13,23 +11,7 @@ const outDir = resolve(__dirname, "dist");
export default defineConfig({
base: "./",
root,
plugins: [
viteStaticCopy({
targets: [
{
src: normalizePath(
resolve(
__dirname,
"node_modules/@shoelace-style/shoelace/dist/assets/",
),
),
dest: "/dist/shoelace/",
},
],
}),
basicSsl(),
svelte(),
],
plugins: [basicSsl(), svelte()],
resolve: {
alias: {
"@components": fileURLToPath(
Expand Down

0 comments on commit 78481ab

Please sign in to comment.