Skip to content

Fix ci

Fix ci #51

name: Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
python-version: [3.8]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: Setup network interfaces
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo ip link add type veth
sudo ip link set dev veth0 address 02:00:00:00:00:00 name feth0
sudo ip link set dev veth1 address 02:00:00:00:00:01 name feth1
sudo ip link set up dev feth0
sudo ip link set up dev feth1
- name: Setup network interfaces
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
sudo ifconfig feth0 create
sudo ifconfig feth0 peer feth1
sudo ifconfig feth0 lladdr 02:00:00:00:00:00 up
sudo ifconfig feth1 lladdr 02:00:00:00:00:01 up
- name: Run tests, flake8 and mypy
run: |
tox
- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v4"
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}