Skip to content

Commit

Permalink
👷(github) lint and build code sources
Browse files Browse the repository at this point in the history
Add a new job that ensure that all code sources
pass ESLint lint rules, Prettier lint rules, and we
can build the static output from code sources.

It makes sure we maintain a high code quality,
and that merging code into the main branch
won't result in error in Scalingo deployment.
  • Loading branch information
lebaudantoine committed Mar 12, 2024
1 parent f906a87 commit 8747748
Showing 1 changed file with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linters
name: lasuite

on:
push:
Expand Down Expand Up @@ -27,4 +27,23 @@ jobs:
- name: Install gitlint
run: pip install --user requests gitlint
- name: Lint commit messages added to main
run: ~/.local/bin/gitlint --commits origin/${{ github.event.pull_request.base.ref }}..HEAD
run: ~/.local/bin/gitlint --commits origin/${{ github.event.pull_request.base.ref }}..HEAD

lint-and-build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint sources
run: yarn lint
- name: Format sources
run: yarn format
- name: Build sources
run: yarn build

0 comments on commit 8747748

Please sign in to comment.