Fix deprecated Ruff settings #108
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
# This workflow runs pylint and unittest | |
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Lint and Test | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
pylint: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python: [3.8, 3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies # pylint does require dependencies to be installed | |
run: | | |
sudo sh -c "echo \"deb [trusted=yes] https://apt.fury.io/jgottula/ /\" >> /etc/apt/sources.list.d/jgottula.list" | |
sudo apt update | |
sudo apt install libasicamera2 | |
python -m pip install --upgrade pip | |
pip install pylint | |
pip install . | |
- name: Lint with pylint | |
run: | | |
pylint track/ | |
unittest: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python: [3.8, 3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo sh -c "echo \"deb [trusted=yes] https://apt.fury.io/jgottula/ /\" >> /etc/apt/sources.list.d/jgottula.list" | |
sudo apt update | |
sudo apt install libasicamera2 | |
python -m pip install --upgrade pip | |
pip install . | |
- name: Run unit tests | |
run: | | |
python3 -m unittest discover tests |