Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
name: CI Pipelinee
name: CI Pipeline

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

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

strategy:
matrix:
node-version: [18.x, 20.x]

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

- name: Setup Node.js ${{ matrix.node-version }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: '20.x'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run linter
run: npm run lint
continue-on-error: true # Don't fail if linting has warnings

- name: Run tests
run: npm test -- --coverage --watchAll=false

- name: Upload coverage reports
uses: codecov/codecov-action@v3
if: matrix.node-version == '20.x'
with:
file: ./coverage/lcov.info
run: npm test -- --run
continue-on-error: true # Remove this once you have tests

- name: Build project
run: npm run build

- name: Upload build artifacts
uses: actions/upload-artifact@v3
if: matrix.node-version == '20.x'
uses: actions/upload-artifact@v4 # Updated to v4
with:
name: build-files
name: production-build
path: ./dist
retention-days: 5

- name: Upload coverage reports
uses: codecov/codecov-action@v4
if: success()
with:
file: ./coverage/lcov.info
fail_ci_if_error: false
Loading