Skip to content

Commit

Permalink
Create ci.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JuditKaramazov authored Apr 25, 2024
1 parent e45c7d6 commit 073c0d0
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 'CI/CD Pipeline'

on:
pull_request:
branches: [main, master]
types: [opened, synchronize]

jobs:
style:
runs-on: ubuntu-latest

strategy:
matrix:
node: [16.x]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci

- name: Check code formating
run: npm run test:format
if: always()

- name: Lint the code
run: npm run test:lint
if: always()

0 comments on commit 073c0d0

Please sign in to comment.