Skip to content

Add remaining type hints and linter checks for the project #200

Add remaining type hints and linter checks for the project

Add remaining type hints and linter checks for the project #200

Workflow file for this run

name: GH Actions
on:
pull_request:
workflow_dispatch:
push:
branches:
- master
- tp-i2n
jobs:
smokecheck-linux:
name: Linux with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.9, 3.11, 3.12]
avocado-version: ["103.0"]
fail-fast: false
steps:
- run: echo "Job triggered by a ${{ github.event_name }} event on branch is ${{ github.ref }} in repository is ${{ github.repository }}, runner on ${{ runner.os }}"
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'requirements_pip.txt'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Display own version
run: |
VERSION=$(cat VERSION)
echo "$VERSION"
# TODO: currently rather install through pip and enable those only if more recent version needed
- name: Installing most up-to-date Aexpect dependency in develop mode
run: |
git clone --depth 1 https://github.com/avocado-framework/aexpect.git aexpect-libs
cd aexpect-libs
pip install -e .
cd ..
- name: Installing most up-to-date Avocado dependency in develop mode
run: |
git clone --depth 1 https://github.com/avocado-framework/avocado.git avocado-libs --branch ${{ matrix.avocado-version }}
cd avocado-libs
pip install -e .
cd ..
- name: Installing most up-to-date Avocado VT dependency in develop mode
run: |
git clone --depth 1 https://github.com/avocado-framework/avocado-vt.git avocado-vt-libs --branch ${{ matrix.avocado-version }}
cd avocado-vt-libs
pip install -e .
cd ..
- name: Install dependencies
run: pip install -r requirements_pip.txt
- run: sleep 3
- name: Create some fake binaries to make vt-bootstrap happy
run: |
mkdir -p /tmp/dummy_bin
touch /tmp/dummy_bin/arping
touch /tmp/dummy_bin/tcpdump
chmod 777 /tmp/dummy_bin/*
echo "/tmp/dummy_bin" >> $GITHUB_PATH
- name: Bootstrapping Avocado VT
run: avocado vt-bootstrap --vt-skip-verify-download-assets --yes-to-all
- name: Isolation tests using parallel avocado runner
# if later on we decide that unit tests are still more appropriate here just do
#run: make check
run: PYTHONPATH=:. avocado run --max-parallel-tasks=4 selftests/isolation/test_*
# TODO: coverage report with avocado runs ends in 0% or ~0%, perhaps due to avocado or its async testing
#run: PYTHONPATH=:. coverage run --append --source=avocado_i2n $(which avocado) run --nrunner-max-parallel-tasks=4 selftests/isolation/test_*
#- name: Collect all coverage
# run: coverage report -m
#- name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# verbose: true
- name: Cleaning up avocado(-vt) libs
run: |
rm -rf avocado-vt-libs
rm -rf avocado-libs
rm -rf aexpect-libs
- run: echo "🥑 This job's status is ${{ job.status }}."