Skip to content

Correct header styling #233

Correct header styling

Correct header styling #233

Workflow file for this run

#
# BSD 2-Clause License
#
# Copyright (c) 2021-2024, Hewlett Packard Enterprise
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
name: run-tests
on:
pull_request:
push:
branches:
- develop
- dash_519
env:
HOMEBREW_NO_ANALYTICS: "ON" # Make Homebrew installation a little quicker
HOMEBREW_NO_AUTO_UPDATE: "ON"
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON"
HOMEBREW_NO_GITHUB_API: "ON"
HOMEBREW_NO_INSTALL_CLEANUP: "ON"
DEBIAN_FRONTEND: "noninteractive" # Disable interactive apt install sessions
jobs:
run_tests:
name: Run tests with ${{ matrix.os }}, Python ${{ matrix.py_v}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-12, ubuntu-20.04] # Operating systems
compiler: [8] # GNU compiler version
py_v: ['3.9', '3.10', '3.11'] # Python versions
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py_v }}
- name: Install build-essentials for Ubuntu
if: contains( matrix.os, 'ubuntu' )
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y wget
- name: Install GNU make for MacOS and set GITHUB_PATH
if: contains( matrix.os, 'macos' )
run: |
brew install make || true
echo "$(brew --prefix)/opt/make/libexec/gnubin" >> $GITHUB_PATH
- name: Install SmartDashboard
run: |
python -m pip install --upgrade pip
python -m pip install .[dev,mypy]
- name: Run Pylint
run: make check-lint
- name: Run mypy
run: |
make check-mypy
- name: Run Pytest
run: |
pytest -s --import-mode=prepend -o log_cli=true --cov=smartdashboard --cov-report=xml --cov-config=./tests/test_configs/cov/local_cov.cfg ./tests/
# Upload artifacts on failure, ignoring binary files
- name: Upload Artifact
if: failure()
uses: actions/upload-artifact@v3
with:
name: test_artifact
path: |
tests/test_output
!**/*.so
!**/*.pb
!**/*.pt
!**/core
retention-days: 5
# - name: Upload Pytest coverage to Codecov
# uses: codecov/codecov-action@v2
# with:
# fail_ci_if_error: true
# files: ./coverage.xml