Skip to content

Commit

Permalink
Añadir Codacy
Browse files Browse the repository at this point in the history
  • Loading branch information
josmorgue3 committed Jan 8, 2025
1 parent 691fbe1 commit b70995f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 135 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/tests.yml → .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: Run tests
name: Codacy CI

on:
push:
branches: [main, develop]
branches:
- main
pull_request:
branches: [main, develop]
branches:
- main

jobs:
pytest:
build:
runs-on: ubuntu-latest

services:
mysql:
image: mysql:5.7
Expand All @@ -23,28 +24,30 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

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

- uses: actions/setup-python@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Prepare environment
run: |
sed -i '/rosemary @ file:\/\/\/app/d' requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
- name: Upload coverage to Codacy
run: |
pip install codacy-coverage
coverage run -m pytest app/modules/ --ignore-glob='*selenium*'
coverage xml
python-codacy-coverage -r coverage.xml
env:
FLASK_ENV: testing
MARIADB_HOSTNAME: 127.0.0.1
MARIADB_PORT: 3306
MARIADB_TEST_DATABASE: uvlhubdb_test
MARIADB_USER: uvlhub_user
MARIADB_PASSWORD: uvlhub_password
run: |
pytest app/modules/ --ignore-glob='*selenium*'
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
18 changes: 0 additions & 18 deletions .github/workflows/commits.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/deloyment_on_webhook.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/deployment_on_dockerhub.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/lint.yml

This file was deleted.

0 comments on commit b70995f

Please sign in to comment.