Skip to content

Commit

Permalink
Include lint and build tests (#7)
Browse files Browse the repository at this point in the history
* ci: include lint and build tests

* chore: apply prettier

* ci: adjust workflow names
  • Loading branch information
wellwelwel authored Aug 1, 2024
1 parent 194224b commit f57ce9a
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 10 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 'CI — Build'

on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
name: Check
steps:
- name: ➕ Actions - Checkout
uses: actions/checkout@v4

- name: ➕ Actions - Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: ➕ Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-linux-${{ hashFiles('package-lock.json') }}
restore-keys: npm-linux-

- name: 📦 Installing Dependencies
run: npm ci

- name: 🤹🏻‍♀️ Building the Project
run: npm run build
37 changes: 37 additions & 0 deletions .github/workflows/ci_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 'CI — Lint'

on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
name: Check
steps:
- name: ➕ Actions - Checkout
uses: actions/checkout@v4

- name: ➕ Actions - Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: ➕ Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-linux-${{ hashFiles('package-lock.json') }}
restore-keys: npm-linux-

- name: 📦 Installing Dependencies
run: npm ci

- name: 👔 ESLint + Prettier Check
run: npm run lint && npm run format:check
23 changes: 13 additions & 10 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ export default function Home() {
<main className="flex flex-1 flex-col items-center justify-center gap-4 text-balance text-center">
<h1 className="text-3xl font-bold">Em desenvolvimento ⚠️</h1>
<div>
<p>Estamos dedicados a trazer o melhor conteúdo para você. Fique ligado(a)!</p>
<p>
<i>
Enquanto isso, confira os{' '}
<Link href="/projetos" className="text-blue-800 underline transition-all hover:text-blue-700 dark:text-blue-200 hover:dark:text-blue-300">
projetos
</Link>{' '}
que já estão disponíveis.
</i>
</p>
<p>Estamos dedicados a trazer o melhor conteúdo para você. Fique ligado(a)!</p>
<p>
<i>
Enquanto isso, confira os{' '}
<Link
href="/projetos"
className="text-blue-800 underline transition-all hover:text-blue-700 dark:text-blue-200 hover:dark:text-blue-300"
>
projetos
</Link>{' '}
que já estão disponíveis.
</i>
</p>
</div>
</main>
);
Expand Down

0 comments on commit f57ce9a

Please sign in to comment.