🔧 Update pylint.yml to test and split the config #4
Workflow file for this run
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: Python CI | |
on: [push, workflow_dispatch] | |
jobs: | |
install-dependencies: | |
runs-on: ubuntu-latest | |
outputs: | |
python-version: ${{ steps.setup-python.outputs.python-version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
id: setup-python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U pylint | |
pip install -r requirements.txt | |
lint: | |
needs: install-dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ needs.install-dependencies.outputs.python-version }} | |
- name: Analysing the code with pylint | |
run: pylint $(git ls-files '*.py') | |
test: | |
needs: install-dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ needs.install-dependencies.outputs.python-version }} | |
- name: Run tests with pytest | |
run: pytest . |