Updates CI to 22.04 runners #282
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
name: Run Python Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.7', '3.9', '3.11'] | |
name: Python ${{ matrix.python-version }} build | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Python 3 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade pip | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install pipenv | |
run: | | |
python -m pip install pipenv wheel | |
- name: Install dependencies | |
run: | | |
pipenv install --dev --pre | |
- name: Install vendored ovs | |
run: ./prepare.sh | |
- name: Run tests with pytest | |
run: pipenv run python -m pytest | |
- name: Check format | |
run: pipenv run python -m black --check --diff . | |
- name: Run flake8 | |
run: pipenv run python -m flake8 ovs_dbg --exclude vendor |