Skip to content

[Docs] CLI Documentation #1269

[Docs] CLI Documentation

[Docs] CLI Documentation #1269

Workflow file for this run

name: Run Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
ssh_enabled:
type: boolean
description: "Run the build with ssh debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: false
jobs:
test:
name: test-${{ matrix.os }}-${{ matrix.python-version}}
runs-on: ${{ matrix.os }}
env:
SPY_WERROR: true
HYPOTHESIS_PROFILE: ci
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.12"]
steps:
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
detached: true
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Checkout repository
uses: actions/checkout@v2
# - name: Install wasi-sdk
# run: |
# cd
# WASI_OS=linux
# WASI_ARCH=x86_64
# WASI_VERSION=24
# WASI_VERSION_FULL=${WASI_VERSION}.0
# WASI_FILENAME=wasi-sdk-${WASI_VERSION_FULL}-${WASI_ARCH}-${WASI_OS}
# wget -q https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION}/${WASI_FILENAME}.tar.gz
# tar xf ${WASI_FILENAME}.tar.gz
# $PWD/${WASI_FILENAME}/bin/clang --version
# echo "$PWD/${WASI_FILENAME}/bin" >> $GITHUB_PATH
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Display versions
run: |
echo PATH="$PATH"
echo
echo python && python --version && echo
echo pip && pip --version && echo
echo clang && clang --version && echo
echo gcc && gcc --version && echo
- name: Install system dependencies
run: |
if [ "$RUNNER_OS" = "Linux" ]; then
sudo apt-get update && sudo apt-get install -y libgc-dev
elif [ "$RUNNER_OS" = "macOS" ]; then
brew install bdw-gc
fi
- name: Install project
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Linter
run: |
ruff check .
- name: Format check
run: |
ruff format --check .
- name: Build libspy
run: |
cd spy/libspy
make
- name: Run tests
run: |
pytest -n auto -m "not mypy" --junit-xml=test-results.xml
- name: Run mypy
run: |
mypy
- name: Surface failing tests
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
summary: true
display-options: fEX
fail-on-empty: true
title: Test results