Skip to content

Commit 370de02

Browse files
committed
add: initial CICD settings; add them colors to DaisyUI
1 parent 24c281b commit 370de02

File tree

6 files changed

+68
-5
lines changed

6 files changed

+68
-5
lines changed

.github/workflows/preview.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Vercel Preview Deployment
2+
env:
3+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
4+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
5+
on: pull_request
6+
jobs:
7+
Deploy-Preview:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Install Vercel CLI
12+
run: npm install --global vercel@latest
13+
- name: Pull Vercel Environment Information
14+
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
15+
- name: Build Project Artifacts
16+
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
17+
- name: Deploy Project Artifacts to Vercel
18+
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

.github/workflows/test.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Lint & Test Workflow
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: "18" # current LTS (we have 16 in Docker)
20+
21+
- name: Install dependencies
22+
run: yarn install
23+
24+
- name: Run Eslint
25+
run: yarn lint --strict
26+
27+
- name: Run Jest tests
28+
run: yarn test
29+
30+
- name: Run Cypress tests
31+
run: yarn cypress

cypress.config.ts

+2
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ export default defineConfig({
66
// implement node event listeners here
77
},
88
},
9+
video: false,
10+
screenshotOnRunFailure: false,
911
});

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"lint": "next lint",
1010
"prettier": "prettier . --write",
1111
"prepare": "husky install",
12-
"test": "jest --watch",
13-
"cypress": "cypress open"
12+
"test": "jest",
13+
"cypress": "cypress run"
1414
},
1515
"dependencies": {
1616
"@prisma/client": "5.1.1",

src/app/counter/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function CounterPage() {
3434
</button>
3535
<button
3636
type="button"
37-
className="btn btn-primary w-1/2"
37+
className="btn btn-secondary w-1/2"
3838
onClick={handleDecrement}
3939
>
4040
-

tailwind.config.js

+14-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,20 @@ module.exports = {
44
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
55
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
66
],
7-
theme: {
8-
extend: {},
7+
theme: {},
8+
daisyui: {
9+
themes: [
10+
{
11+
chingu: {
12+
primary: "#40936d",
13+
secondary: "#E6624B",
14+
warning: "#f6d860",
15+
accent: "#37cdbe",
16+
neutral: "#757575",
17+
"base-100": "#ffffff",
18+
},
19+
},
20+
],
921
},
1022
plugins: [require("daisyui")],
1123
};

0 commit comments

Comments
 (0)