Skip to content

Commit

Permalink
ci(config): Add verification
Browse files Browse the repository at this point in the history
  • Loading branch information
olaf-cichocki committed Dec 13, 2024
1 parent 50b51fe commit 49783ac
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/pr-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Pull Request

on: [pull_request_target] #To ensure better security and avoid running on forks

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
version: [14, 16, 18]
steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
cache: 'npm'

- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ matrix.version }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.version }}-
- name: Installing dependencies
run: npm ci

- name: Running tests
run: npm run test

- name: Running lint
run: npm run lint

- name: Running typecheck
run: npm run typecheck

0 comments on commit 49783ac

Please sign in to comment.