Skip to content

Commit

Permalink
add CI yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
toni-santos committed Sep 25, 2024
1 parent 24ebe74 commit 3d12d7a
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

on:
push: # Run on pushes to "develop"
branches:
- develop
pull_request: # Run on PRs to "develop"
branches:
- develop
types: [opened, reopened, synchronize, ready_for_review]

jobs:
prettier:
if: ${{ github.event.pull_request.draft == false }}

name: Check Javascript code style
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 21
cache: yarn

- name: Install dependencies
run: yarn install

- name: Run Prettier
run: yarn format

eslint:
if: ${{ github.event.pull_request.draft == false }}

name: Lint Javascript code
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 21
cache: yarn

- name: Install dependencies
run: yarn install

- name: Run Eslint
run: yarn lint

0 comments on commit 3d12d7a

Please sign in to comment.