Skip to content

Commit 676761a

Browse files
committed
Added codecov analysis + minor fixes + expand README.md with new badges
1 parent 4df7e76 commit 676761a

File tree

3 files changed

+46
-2
lines changed

3 files changed

+46
-2
lines changed
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Run tests and upload coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
branches:
10+
- develop
11+
12+
jobs:
13+
test:
14+
name: Run tests and collect coverage
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: '3.x' # Specify your Python version if necessary
26+
27+
- name: Install dependencies
28+
run: |
29+
pip install -r requirements.txt
30+
pip install pytest pytest-cov
31+
32+
- name: Run tests with coverage
33+
run: pytest --cov=dracan --cov-report=xml
34+
35+
- name: Upload coverage to Codecov
36+
uses: codecov/codecov-action@v4
37+
with:
38+
token: ${{ secrets.CODECOV_TOKEN }}
39+
files: ./coverage.xml
40+
flags: unittests
41+
name: codecov-coverage
42+
fail_ci_if_error: true # Ensures the action fails if there’s an issue with uploading

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Use the official Python 3.14.0 slim image
1+
# Use the official Python alpine image
22
FROM python:alpine
33

44
# Set environment variables for production

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
<img src="https://veinar.pl/dracan.png" alt="logo" width="300"/>
33

44
![GitHub License](https://img.shields.io/github/license/Veinar/dracan?style=flat)
5-
![Contrib Welcome](https://img.shields.io/badge/contributions-welcome-blue)
65
![Code style](https://img.shields.io/badge/code%20style-black-black)
6+
![Docker Image Size](https://img.shields.io/docker/image-size/veinar/dracan)
7+
![Docker Pulls](https://img.shields.io/docker/pulls/veinar/dracan?color=yellow)
8+
![Contrib Welcome](https://img.shields.io/badge/contributions-welcome-blue)
79

810
<br>
911
</p>

0 commit comments

Comments
 (0)