change linter to ruff #258
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: build | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: [ main ] | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ 3.9 ] | |
env: | |
OS: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
if [ -f test_requirements.txt ]; then pip install -r test_requirements.txt; fi | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
scripts/lint | |
- name: Unit test with coverage | |
run: | | |
scripts/coverage | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
- name: smoke test | |
run: | | |
pip install . | |
mkdir -p /home/runner/.config/opn-cli | |
touch /home/runner/.config/opn-cli/conf.yaml | |
opn-cli version | |
opn-cli new command core firewall category --tag categories -m https://raw.githubusercontent.com/opnsense/core/master/src/opnsense/mvc/app/models/OPNsense/Firewall/Category.xml -f https://raw.githubusercontent.com/opnsense/core/master/src/opnsense/mvc/app/controllers/OPNsense/Firewall/forms/categoryEdit.xml |