-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fcd6e84
commit 7707177
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |