Skip to content

Commit

Permalink
ci: Add workflow file for pull requests (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-exists authored Sep 11, 2023
1 parent 3effd8b commit e1152d2
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will run all checks required for a PR to be merged.

name: Build and Test ci

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/[email protected]

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "18.16.1"
registry-url: "https://registry.npmjs.org"

- name: Check Yarn Version
run: yarn --version

- name: Install dependencies
run: yarn

- name: Check linting and formatting
run: |
if yarn lint && yarn format --check; then
echo "Linting and formatting checks passed."
else
echo "Linting or formatting checks failed. Please fix the issues."
exit 1
fi

0 comments on commit e1152d2

Please sign in to comment.