Merge pull request #11 from indivisiblefoundation/dependabot/pip/aioh… #12
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
| # This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
|
Check failure on line 1 in .github/workflows/python-app.yml
|
||
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
| name: Python application | ||
| on: | ||
| push: | ||
| branches: [ "tikkitytnt" ] | ||
| pull_request: | ||
| branches: [ "tikkitytnt" ] | ||
| permissions: | ||
| contents: read write | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python 3.10 | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: "3.10" | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install flake8 pytest | ||
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
| - name: Lint with flake8 | ||
| run: | | ||
| # stop the build if there are Python syntax errors or undefined names | ||
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
| - name: Test with pytest | ||
| run: | | ||
| pytest | ||
| - name: Cache | ||
| uses: actions/cache@v5.0.1 | ||
| with: | ||
| # A list of files, directories, and wildcard patterns to cache and restore | ||
| path: | ||
| # An explicit key for restoring and saving the cache | ||
| key: | ||
| # An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case. | ||
| restore-keys: # optional | ||
| # The chunk size used to split up large files during upload, in bytes | ||
| upload-chunk-size: # optional | ||
| # An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms | ||
| enableCrossOsArchive: # optional, default is false | ||
| # Fail the workflow if cache entry is not found | ||
| fail-on-cache-miss: # optional, default is false | ||
| # Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache | ||
| lookup-only: # optional, default is false | ||
| # Run the post step to save the cache even if another step before fails | ||
| save-always: # optional, default is false | ||