Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Update pytest output file names #93

Update pytest output file names

Update pytest output file names #93

Workflow file for this run

name: Check COMPASS
on:
# push: # cannot use it due to EndBug/add-and-commit@v9 action which commit the new report
# branches:
# - main
# - saxoPlus
pull_request:
# Sequence of patterns matched against refs/heads
branches:
- beta
- main
- saxoPlus
jobs:
install_and_test:
runs-on: self-hosted
container:
image: aocompass/base-20.04:11.8.0
options: --user root --gpus=all
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
max-parallel: 1
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Anaconda with python ${{ matrix.python-version }}
run: |
conda create -y --name compass -c anaconda python=${{ matrix.python-version }}
- name: Install compass and dependencies
run: |
eval "$(/home/compass/miniconda3/bin/conda shell.bash hook)"
conda activate compass
conda install -c "compass/label/cuda11" compass -y
pip install coverage coverage-badge ruff pytest pytest-cov pytest-cover pytest-coverage pytest-html pytest-metadata
- name: Lint with Ruff
run: |
eval "$(/home/compass/miniconda3/bin/conda shell.bash hook)"
conda activate compass
ruff --format=github --target-version=py310 .
continue-on-error: true
- name: Check Compass on scao_sh_16x16_8pix
run: |
export SHESHA_ROOT=$PWD
export PYTHONPATH=$SHESHA_ROOT:$PYTHONPATH
export PYTHONDONTWRITEBYTECODE=1
eval "$(/home/compass/miniconda3/bin/conda shell.bash hook)"
conda activate compass
ipython shesha/scripts/closed_loop.py data/par/par4bench/scao_sh_16x16_8pix.py
- name: Check Compass
run: |
export SHESHA_ROOT=$PWD
export PYTHONPATH=$SHESHA_ROOT:$PYTHONPATH
export PYTHONDONTWRITEBYTECODE=1
eval "$(/home/compass/miniconda3/bin/conda shell.bash hook)"
conda activate compass
./tests/checkCompass.sh
- name: Archive check results
uses: actions/upload-artifact@v3
with:
name: report
path: |
report_E2E.md
- name: Build coverage file and unit tests report
run: |
export SHESHA_ROOT=$PWD
export PYTHONPATH=$SHESHA_ROOT:$PYTHONPATH
export PYTHONDONTWRITEBYTECODE=1
eval "$(/home/compass/miniconda3/bin/conda shell.bash hook)"
conda activate compass
pytest --junitxml=pytest-sup.xml --cov-report=term-missing:skip-covered --cov=shesha tests/pytest/supervisor | tee pytest-sub-coverage.txt
pytest --junitxml=pytest-rtc.xml --cov-report=term-missing:skip-covered --cov=shesha tests/pytest/rtc | tee pytest-rtc-coverage.txt
pytest --junitxml=pytest-rtc_standalone.xml --cov-report=term-missing:skip-covered --cov=shesha tests/pytest/rtc_standalone | tee pytest-rtc_standalone-coverage.txt
- name: Archive check results
uses: actions/upload-artifact@v3
with:
name: unit_tests_report
path: |
pytest-sub-coverage.txt
pytest-sup.xml
pytest-rtc-coverage.txt
pytest-rtc.xml
pytest-rtc_standalone-coverage.txt
pytest-rtc_standalone.xml
- name: Fix dubious ownership
run: git config --global --add safe.directory /__w/shesha/shesha
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
multiple-files: |
Supervisor, pytest-sub-coverage.txt, pytest-sup.xml
RTC, pytest-rtc-coverage.txt, pytest-rtc.xml
RTC Standalone, pytest-rtc_standalone-coverage.txt, pytest-rtc_standalone.xml
pytest-xml-coverage-path: ''
pytest-coverage-path: ''
junitxml-path: ''
title: COMPASS Coverage Report
badge-title: Coverage
hide-badge: false
hide-report: false
create-new-comment: false
hide-comment: false
report-only-changed-files: false
remove-link-from-badge: false
# - name: Archive report
# if: vars.GITHUB_REF_NAME != 'main'
# uses: EndBug/add-and-commit@v9
# with:
# default_author: github_actions
# message: 'Update report_E2E.md'
# add: 'report_E2E.md'