Skip to content

2024.07.07 refactoring for flake8 #234

2024.07.07 refactoring for flake8

2024.07.07 refactoring for flake8 #234

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://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.x]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v1
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip pylint wheel
pip install -r requirements.txt
pip install -r require_test.txt
pip install flake8
- name: Lint with flake8
run: |
python -m flake8 rssd
# - name: Lint with pylint
# run: |
# python -m pylint rssd
- name: Unit Test
run: |
# pytest
coverage run -m unittest test.test_RSSD
coverage run -a -m unittest test.test_yaVISA
coverage run -a -m unittest discover -b -p test_HW_DSO*
coverage run -a -m unittest discover -b -p test_HW_NRQ*
coverage run -a -m unittest discover -b -p test_HW_NRP*
coverage run -a -m unittest discover -b -p test_HW_OSP*
coverage run -a -m unittest discover -b -p test_HW_OTA*
coverage run -a -m unittest discover -b -p test_HW_PNA*
coverage run -a -m unittest discover -b -p test_HW_RCT*
coverage run -a -m unittest discover -b -p test_HW_VNA*
coverage run -a -m unittest discover -b -p test_HW_VSA*
coverage run -a -m unittest discover -b -p test_HW_VSE*
coverage run -a -m unittest discover -b -p test_HW_VSG*
coverage run -a -m unittest discover -b -p test_HW_VST*.py
coverage run -a -m unittest discover -b -p test_SW*
- name: Coveralls Python
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
# coveralls_finish:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip pylint wheel
# pip install -r requirements.txt
# - name: Coveralls Finished
# uses: AndreMiras/coveralls-python-action@develop
# with:
# parallel-finished: true
# - name: Coveralls
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}