Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Switch to codecov #381

Merged
merged 5 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
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
12 changes: 7 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- main
pull_request:
workflow_dispatch:
surchs marked this conversation as resolved.
Show resolved Hide resolved

jobs:
test:
Expand Down Expand Up @@ -47,12 +46,15 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --per-file-ignores=./app/api/models.py:F722
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Test with pytest
run: |
coverage run -m pytest -m "integration or not integration"
coverage lcov -o ./coverage/lcov.info
- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]

- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}


24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

# Neurobagel API

[![Tests](https://img.shields.io/github/actions/workflow/status/neurobagel/api/test.yaml?color=BDB76B&label=test&style=flat-square)](https://github.com/neurobagel/api/actions/workflows/test.yaml)
[![Coverage](https://img.shields.io/coverallsCoverage/github/neurobagel/api?style=flat-square&color=8FBC8F)](https://coveralls.io/github/neurobagel/api)
[![Python](https://img.shields.io/badge/python-3.10-4682B4?style=flat-square)](https://www.python.org/)
[![License](https://img.shields.io/github/license/neurobagel/api?color=CD5C5C&style=flat-square)](LICENSE)
[![Tests](https://img.shields.io/github/actions/workflow/status/neurobagel/api/test.yaml?color=BDB76B&label=test&style=flat)](https://github.com/neurobagel/api/actions/workflows/test.yaml)
[![codecov](https://codecov.io/gh/neurobagel/api/graph/badge.svg?token=ZEOGQFFZMJ)](https://codecov.io/gh/neurobagel/api)
[![Python](https://img.shields.io/badge/python-3.10-4682B4?style=flat)](https://www.python.org/)
surchs marked this conversation as resolved.
Show resolved Hide resolved
[![License](https://img.shields.io/github/license/neurobagel/api?color=CD5C5C&style=flat)](LICENSE)
![Docker Image Version (tag)](https://img.shields.io/docker/v/neurobagel/api/latest?logo=docker)


</div>

Expand All @@ -15,9 +17,17 @@ Please refer to our [**official documentation**](https://neurobagel.org/api/) fo

- [Quickstart](#quickstart)
- [Local installation](#local-installation)
- [Environment variables](#set-the-environment-variables)
- [Docker (recommended)](#docker)
- [Python](#python)
- [Clone the repo](#clone-the-repo)
- [Set the environment variables](#set-the-environment-variables)
- [Docker](#docker)
- [Option 1 (RECOMMENDED): Use the Neurobagel Docker Compose recipe](#option-1-recommended-use-the-neurobagel-docker-compose-recipe)
- [Option 2: Use the latest image from Docker Hub](#option-2-use-the-latest-image-from-docker-hub)
- [Option 3: Build the image using the Dockerfile](#option-3-build-the-image-using-the-dockerfile)
- [Send a test query to the API](#send-a-test-query-to-the-api)
- [Python](#python)
- [Install dependencies](#install-dependencies)
- [Launch the API](#launch-the-api)
- [Troubleshooting](#troubleshooting)
- [Testing](#testing)
- [The default Neurobagel SPARQL query](#the-default-neurobagel-sparql-query)
- [License](#license)
Expand Down