| # SPDX-License-Identifier: Apache-2.0 |
| |
| name: build |
| |
| on: |
| push: |
| pull_request: |
| branches: |
| - main |
| |
| concurrency: |
| group: ${{ github.workflow }}-${{ github.ref }} |
| cancel-in-progress: true |
| |
| permissions: |
| security-events: write |
| contents: read |
| pull-requests: read |
| |
| jobs: |
| build: |
| name: Python ${{ matrix.python }} on ${{ matrix.os }} |
| runs-on: ${{ matrix.os }} |
| strategy: |
| fail-fast: false |
| matrix: |
| os: |
| - ubuntu-22.04 |
| - macos-14 |
| python: |
| - '3.11' |
| - '3.12' |
| steps: |
| - name: Checkout Sources |
| uses: actions/checkout@v4 |
| - name: Check Licenses |
| run: sh check-licenses.sh |
| - name: Setup Python ${{ matrix.python }} |
| uses: actions/setup-python@v5 |
| with: |
| python-version: ${{ matrix.python }} |
| - name: Install Hatch |
| run: | |
| python -m pip install --upgrade pip |
| pip install hatch |
| - name: Check Formatting |
| run: hatch fmt --check |
| - name: Build Distribution |
| run: hatch build |