Skip to content

Merge pull request #11 from indivisiblefoundation/dependabot/pip/aioh… #12

Merge pull request #11 from indivisiblefoundation/dependabot/pip/aioh…

Merge pull request #11 from indivisiblefoundation/dependabot/pip/aioh… #12

Workflow file for this run

# 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

View workflow run for this annotation

GitHub Actions / .github/workflows/python-app.yml

Invalid workflow file

(Line: 13, Col: 13): Unexpected value 'read write', (Line: 41, Col: 9): Unexpected value 'actions/cache@v5.0.1', (Line: 44, Col: 5): Unexpected value 'path', (Line: 46, Col: 5): Unexpected value 'key', (Line: 48, Col: 5): Unexpected value 'restore-keys', (Line: 50, Col: 5): Unexpected value 'upload-chunk-size', (Line: 52, Col: 5): Unexpected value 'enableCrossOsArchive', (Line: 54, Col: 5): Unexpected value 'fail-on-cache-miss', (Line: 56, Col: 5): Unexpected value 'lookup-only', (Line: 58, Col: 5): Unexpected value 'save-always'
# 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