Skip to content

Commit

Permalink
Set up CI and dependabot (GEA-12109) (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenany authored Jan 29, 2024
1 parent 7c597a4 commit c809bc1
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 37 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily

- package-ecosystem: npm
directory: /
schedule:
interval: daily
91 changes: 91 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: CI

on:
push:
branches:
- main

pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review

merge_group:

workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

env:
NEXT_TELEMETRY_DISABLED: 1

jobs:
prefetch:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1

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

- name: Install dependencies
run: npm ci

build:
needs: [prefetch]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1

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

- name: Next.js cache
uses: actions/cache@v4.0.0
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

lint:
needs: [prefetch]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1

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

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
7 changes: 0 additions & 7 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// !! WARN !!
ignoreBuildErrors: true,
},
}

module.exports = nextConfig
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@
"lucide-react": "^0.279.0",
"next": "latest",
"pangea-node-sdk": "^2.2.1",
"react": "latest",
"react-dom": "latest",
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@types/node": "latest",
"@types/react": "latest",
"@types/react-dom": "latest",
"autoprefixer": "latest",
"eslint": "latest",
"eslint-config-next": "latest",
"postcss": "latest",
"tailwindcss": "latest",
"typescript": "latest"
"@types/node": "20.7.0",
"@types/react": "18.2.23",
"@types/react-dom": "18.2.7",
"autoprefixer": "10.4.16",
"eslint": "8.50.0",
"eslint-config-next": "13.5.3",
"postcss": "8.4.30",
"tailwindcss": "3.3.3",
"typescript": "5.2.2"
}
}
15 changes: 7 additions & 8 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Image from 'next/image'
import { Kanit } from 'next/font/google'
import BreachCheck from '@/components/BreachCheck'
import BreachInfo from '@/components/BreachInfo'
Expand All @@ -21,13 +20,13 @@ export interface breachedDataType {
export default function Home() {
const [breachCount, setBreachCount] = useState(0);
const [breachData, setBreachData] = useState({
"name": new Set(),
"phone": new Set(),
"dob": new Set(),
"address": new Set(),
"email": new Set(),
"password_plaintext": new Set(),
"ip_address": new Set()
"name": new Set<string>(),
"phone": new Set<string>(),
"dob": new Set<string>(),
"address": new Set<string>(),
"email": new Set<string>(),
"password_plaintext": new Set<string>(),
"ip_address": new Set<string>()
})
return (
<>
Expand Down

0 comments on commit c809bc1

Please sign in to comment.