Skip to content

Commit

Permalink
feat: add CI workflow with Node.js and Codecov integration
Browse files Browse the repository at this point in the history
Introduce a CI pipeline that triggers on pushes and pull requests to the main branch and feature branches. This workflow includes building the project, running tests with coverage, and uploading coverage reports to Codecov.
  • Loading branch information
mallikcheripally committed Aug 9, 2024
1 parent c57c22e commit 11603e3
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
branches:
- main
- 'feature/*'
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20] # Test against Node.js 20

steps:
- name: Checkout code
uses: actions/checkout@v4

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

- run: yarn install
- run: yarn build

- name: Run tests with coverage
run: yarn test --coverage
env:
CI: true

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.0.1
with:
files: ./coverage/lcov.info
flags: unittests
name: codecov-umbrella
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 11603e3

Please # to comment.