Skip to content

Commit

Permalink
chore: Add PR Check workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-logan committed Oct 4, 2024
1 parent fcd6e84 commit 7707177
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: PR Check

on:
# Runs on pushes targeting the default branch
pull_request:
branches: ['main']
push:
branches: ['main']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'
- run: yarn install
- run: yarn build
- name: Check if dist and types directories exist
run: |
if [ ! -d "dist" ]; then
echo "Error: dist directory does not exist."
exit 1
fi
if [ ! -d "types" ]; then
echo "Error: types directory does not exist."
exit 1
fi
- name: Run tests
run: yarn test

0 comments on commit 7707177

Please sign in to comment.