Skip to content

Work on github workflow #16

Work on github workflow

Work on github workflow #16

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Build Binary
concurrency: production
on:
push:
branches:
- master
#tags:
# - 'v[0-9]+.[0-9]+.[0-9]+' # Push events to every tag not containing /
jobs:
build-linux:
runs-on: ubuntu-latest
permissions: write-all
strategy:
fail-fast: false
matrix:
python-version: [ "3.10" ]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install -e .[dev]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --ignore=W191 --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --ignore=W191 --max-complexity=15 --max-line-length=127 --statistics
- name: Build binary
run: |
pyinstaller -F src/net_diag/bin/network_discover.py
- name: Create Release
run: gh release create ${{ github.ref_name }} -d -p -F RELEASE.md --title "Network Diagnostics testing"
- name: Upload Release
run: gh release upload ${{ github.ref_name }} --clobber dist/network_discover