1# Build and test the python package 2name: Python build and test 3 4on: 5 push: 6 branches: [ main ] 7 pull_request: 8 branches: [ main ] 9 10permissions: 11 contents: read 12 13jobs: 14 build: 15 16 runs-on: ubuntu-latest 17 strategy: 18 matrix: 19 python-version: ["3.8", "3.9", "3.10"] 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 ${{ matrix.python-version }} 30 uses: actions/setup-python@v4 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,documentation]" 37 - name: Test 38 run: | 39 invoke test 40 - name: Build 41 run: | 42 inv build 43 inv build.mkdocs 44