Skip to content

Commit

Permalink
chore: add pull request workflow gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
jpapini committed Jun 19, 2024
1 parent cfb5a72 commit d8e0a1c
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Pull Request

on:
pull_request:
types: [opened, synchronize]

jobs:
lint-commits:
name: Lint / Commits
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PNPM
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Linting commits
run: pnpm commitlint --from=main

lint-files:
name: Lint / Files
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup PNPM
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Linting files
run: pnpm run lint

test-units:
name: Test / Units
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup PNPM
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Building
run: pnpm run build

- name: Testing
run: pnpm run test

0 comments on commit d8e0a1c

Please sign in to comment.