Skip to content

Merge pull request #66 from Erik-Lamers1/upgrade-linters-2024 #162

Merge pull request #66 from Erik-Lamers1/upgrade-linters-2024

Merge pull request #66 from Erik-Lamers1/upgrade-linters-2024 #162

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Pytest
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install apt dependencies
run: |
sudo apt-get -y install python3-apt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/test.txt
- name: Test with pytest
env:
SETTINGS_MODULE: vnet_manager.settings.test
PYTHONPATH: "/usr/lib/python${{ matrix.python-version }}/dist-packages:/usr/lib/python3.8/dist-packages:/usr/lib/python3/dist-packages:${PYTHONPATH}"
PYTHONDONTWRITEBYTECODE: 1
run: |
pytest --cov vnet_manager --cov-report term --cov-report xml:coverage.xml
- name: Run the yamllint over all the YAML files
env:
PYTHONPATH: ".:${PYTHONPATH}"
run: |
python3 tools/yaml_syntax_validator.py
- name: Analysing the code with pylint
run: |
pylint vnet_manager
- name: Push to codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true