Fix dependency installation #63
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: TICS Code Quality Analysis | |
on: | |
push: | |
branches: | |
- "main" | |
- "add-checkbox-tiobe" | |
# schedule: | |
# - cron: '00 19 * * *' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
TICS: | |
runs-on: ubuntu-latest | |
environment: TICS | |
steps: | |
- uses: actions/checkout@v4 | |
# with: | |
# ref: main | |
- name: Install dependencies | |
run: | | |
echo "::group::apt update" | |
sudo apt-get update | |
echo "::endgroup::" | |
echo "::group::apt install..." | |
sudo apt-get install -y libsystemd-dev python3-pip pylint flake8 libbluetooth3 libbluetooth-dev | |
echo "::endgroup::" | |
- name: Install Checkbox | |
run: | | |
sudo python -m pip install -e $PWD/checkbox-ng | |
sudo python -m pip install -e $PWD/checkbox-support | |
sudo python -m pip install psutil==5.9.5 opencv_python==4.8.0.76 natsort==8.0.2 libsvm==3.23.0.4 numpy==1.26.4 coverage==7.3.0 urwid==2.1.2 pynmea2 loguru importlib_resources pylxd pytest evdev pyalsaaudio RPi.GPIO PyQRCode picamera | |
- name: Run coverage tests | |
run: | | |
REPO_DIR="$PWD" | |
COVR_DIR="$PWD/.coverage" | |
# Providers | |
echo "::group::coverage tests for providers..." | |
cd $REPO_DIR/providers/base | |
coverage run --append --branch --data-file=$COVR_DIR/.coverage manage.py test -u | |
cd $REPO_DIR/providers/certification-client | |
coverage run --append --branch --data-file=$COVR_DIR/.coverage manage.py test -u | |
cd $REPO_DIR/providers/certification-server | |
coverage run --append --branch --data-file=$COVR_DIR/.coverage manage.py test -u | |
cd $REPO_DIR/providers/docker | |
coverage run --append --branch --data-file=$COVR_DIR/.coverage manage.py test -u | |
cd $REPO_DIR/providers/genio | |
coverage run --append --branch --data-file=$COVR_DIR/.coverage manage.py test -u | |
cd $REPO_DIR/providers/gpgpu | |
coverage run --append --branch --data-file=$COVR_DIR/.coverage manage.py test -u | |
cd $REPO_DIR/providers/iiotg | |
coverage run --append --branch --data-file=$COVR_DIR/.coverage manage.py test -u | |
cd $REPO_DIR/providers/resource | |
coverage run --append --branch --data-file=$COVR_DIR/.coverage manage.py test -u | |
cd $REPO_DIR/providers/sru | |
coverage run --append --branch --data-file=$COVR_DIR/.coverage manage.py test -u | |
cd $REPO_DIR/providers/tpm2 | |
coverage run --append --branch --data-file=$COVR_DIR/.coverage manage.py test -u | |
cd $REPO_DIR/providers/tutorial | |
coverage run --append --branch --data-file=$COVR_DIR/.coverage manage.py test -u | |
cd $REPO_DIR | |
echo "::endgroup::" | |
# Checkbox-ng | |
echo "::group::coverage tests for checkbox-ng..." | |
coverage run --append --branch --data-file=$COVR_DIR/.coverage -m pytest $PWD/checkbox-ng | |
echo "::endgroup::" | |
# Checkbox-support | |
echo "::group::coverage tests for checkbox-support..." | |
coverage run --append --branch --data-file=$COVR_DIR/.coverage -m pytest $PWD/checkbox-support/checkbox_support/ | |
echo "::endgroup::" | |
# Coverage report XML | |
echo "::group::coverage XML report..." | |
coverage xml -i --data-file $COVR_DIR/.coverage -o $COVR_DIR/cobertura.xml | |
echo "::endgroup::" | |
- name: TICS GitHub Action | |
uses: tiobe/tics-github-action@v3 | |
with: | |
mode: qserver | |
project: checkbox | |
viewerUrl: https://canonical.tiobe.com/tiobeweb/TICS/api/cfg?name=default | |
branchdir: ${{ github.workspace }} | |
ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }} | |
installTics: true | |
calc: ALL |