Switch to using a virtualenv for tests #336
Workflow file for this run
This file contains hidden or 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: Lint | |
| on: [push, pull_request] | |
| jobs: | |
| pylint: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{ matrix.container-image }} | |
| strategy: | |
| matrix: | |
| container-image: ["rockylinux:8", "rockylinux:9"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Python | |
| run: | | |
| dnf install -y python3 findutils | |
| - name: Install dependencies | |
| run: | | |
| python3 -m venv "$RUNNER_TEMP/venv" | |
| "$RUNNER_TEMP/venv/bin/pip" install --upgrade pip | |
| "$RUNNER_TEMP/venv/bin/pip" install -r requirements.txt | |
| "$RUNNER_TEMP/venv/bin/pip" install -r test_requirements.txt | |
| - name: Analysing any changed code with pylint | |
| run: | | |
| find . -type f -name '*.py' | xargs -r "$RUNNER_TEMP/venv/bin/pylint" --max-line-length=120 |