Skip to content
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
10 changes: 10 additions & 0 deletions .github/workflows/arm-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
base_image: ${{ matrix.base_image }}
cpu: ${{ matrix.cpu }}
cpu_info: ${{ matrix.cpu_info }}
copy_artifact_path: coverage.xml
copy_artifact_dest: ./coverage-${{ matrix.target }}.xml
copy_repository_path: /opt/pynab
optimize_image: no
commands: |
Expand All @@ -54,6 +56,14 @@ jobs:
# And it also fails with aarch64 binaries of postgresql.
sudo -u pi taskset -c 0 /bin/bash /opt/pynab/install.sh ci-chroot-test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage-${{ matrix.target }}.xml
fail_ci_if_error: true
flags: unittests-${{ matrix.target }}
token: ${{ secrets.CODECOV_TOKEN }}

create_image:
name: Build image
runs-on: ubuntu-latest
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Nabaztag en Python pour Raspberry Pi

[![build (qemu)](https://github.com/mtouzot/pynab/actions/workflows/arm-runner.yml/badge.svg?branch=main)](https://github.com/mtouzot/pynab/actions/workflows/arm-runner.yml)
[![tests](https://github.com/mtouzot/pynab/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/mtouzot/pynab/actions/workflows/tests.yml)
[![build (raspberry pi)](https://github.com/mtouzot/pynab/actions/workflows/arm-runner.yml/badge.svg?branch=main)](https://github.com/mtouzot/pynab/actions/workflows/arm-runner.yml)
![coverage](https://codecov.io/gh/mtouzot/pynab/branch/main/graph/badge.svg)

![lint](https://github.com/mtouzot/pynab/actions/workflows/python-lint.yml/badge.svg)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

![release](https://img.shields.io/github/v/release/mtouzot/pynab)
![python](https://img.shields.io/badge/python-3.9-blue)

![license](https://img.shields.io/github/license/mtouzot/pynab)

## Cartes

Ce système est conçu pour deux cartes pour **Nabaztag** (v1) et **Nabaztag:Tag** (v2) :
Expand Down Expand Up @@ -112,4 +120,4 @@ Voir le [protocole nabd](PROTOCOL.md)

## Contribution

Vos contributions sont toujours les bienvenues ! Veuillez d'abord consulter les [directives de contribution](CONTRIBUTING.md).
Vos contributions sont toujours les bienvenues ! Veuillez d'abord consulter les [directives de contribution](CONTRIBUTING.md).
6 changes: 4 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,12 @@ else
fi

if [ $test -eq 1 ]; then
echo "Running tests"
if [ $ci_chroot -eq 1 ]; then
sudo CI=1 venv/bin/pytest
echo "Running tests with coverage (CI chroot)"
sudo CI=1 venv/bin/coverage run -m pytest
sudo venv/bin/coverage xml -o /opt/pynab/coverage.xml
else
echo "Running tests"
sudo venv/bin/pytest
fi
fi
Expand Down
Loading