Skip to content

merge feature/services-refactor into develop #26

merge feature/services-refactor into develop

merge feature/services-refactor into develop #26

Workflow file for this run

name: 'ci-check'
on:
pull_request:
branches:
- develop
- main
jobs:
prettier:
name: Check Code Formatting
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies for Prettier
run: yarn install
- name: Run Prettier
run: yarn format
- name: Check for uncommitted changes
run: |
git diff --exit-code
shell: bash
lint:
name: Check with Lint
runs-on: ubuntu-latest
needs: prettier
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies for linting
run: |
yarn install
yarn add -D typescript
- name: Run ESLint
run: |
yarn lint --max-warnings=0 # Ejecutar ESLint con el comando configurado
tests:
name: Test Application
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install bun
uses: oven-sh/setup-bun@v2
- name: Verify bun installation
run: bun --version
- name: Install dependencies
run: bun install
- name: Run tests
run: bun test
docker-build:
name: Build Docker Image
runs-on: ubuntu-latest
needs: tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Docker image
run: |
echo "Building Docker image..."
docker build -t chatterpay-back .
- name: Report Status
env:
GH_TOKEN: ${{ github.token }}
run: |
curl -X POST \
-H "Authorization: Bearer $GH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"state": "success", "description": "Check Status Report", "context": "Check Status Report"}' \
https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }}