#18 add option to ignore TLE checksum #130
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Tests | |
on: | |
push: | |
branches: ["dev"] | |
pull_request: | |
branches: ["dev"] | |
permissions: | |
contents: read | |
jobs: | |
unittests: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Conda install | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-activate-base: false | |
activate-environment: sats-receiver-test-venv | |
channel-priority: strict | |
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! | |
- name: Get Variables | |
id: get-vars | |
run: | | |
echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT | |
echo "pip-cache-dir=$(pip cache dir)" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: pip cache | |
uses: actions/cache@v3 | |
id: pip-cache | |
with: | |
path: ${{ steps.get-vars.outputs.pip-cache-dir }} | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
- name: Conda cache | |
uses: actions/cache@v3 | |
id: conda-cache | |
env: | |
# Increase this value to reset cache if test-env.yml has not changed | |
CACHE_NUMBER: 0 | |
with: | |
path: ${{ env.CONDA_PKGS_DIR }} | |
key: | |
conda-${{ runner.os }}-${{ runner.arch }}-${{ | |
steps.get-vars.outputs.today }}-${{ | |
hashFiles('test-env.yml') }}-${{ env.CACHE_NUMBER }} | |
- name: Update environment | |
run: conda env update -f test-env.yml | |
- name: Prepare GNURadio | |
run: | | |
mkdir -p $HOME/.gnuradio/prefs | |
chown -R $(id -u):$(id -g) $HOME/.gnuradio/ | |
echo "gr::vmcircbuf_sysv_shm_factory" > $HOME/.gnuradio/prefs/vmcircbuf_default_factory | |
shell: bash | |
- name: Run tests and collect coverage | |
run: coverage run --omit=tests/* --source=sats_receiver -m unittest discover -v | |
- name: Generate report | |
run: coverage xml | |
- name: Show report | |
run: coverage report -m | |
- name: Send report to codecov | |
uses: codecov/codecov-action@v3 |