1# Check the code against the formatter and linter 2name: Code format and lint check 3 4on: 5 push: 6 branches: [ main ] 7 pull_request: 8 branches: [ main ] 9 10permissions: 11 contents: read 12 13jobs: 14 check: 15 name: Check Code 16 runs-on: ubuntu-latest 17 strategy: 18 matrix: 19 python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] 20 fail-fast: false 21 22 steps: 23 - name: Check out from Git 24 uses: actions/checkout@v3 25 - name: Get history and tags for SCM versioning to work 26 run: | 27 git fetch --prune --unshallow 28 git fetch --depth=1 origin +refs/tags/*:refs/tags/* 29 - name: Set up Python 30 uses: actions/setup-python@v3 31 with: 32 python-version: ${{ matrix.python-version }} 33 - name: Install dependencies 34 run: | 35 python -m pip install --upgrade pip 36 python -m pip install ".[build,test,development,pandora]" 37 - name: Check 38 run: | 39 invoke project.pre-commit 40