test.yml
1 # SPDX-FileCopyrightText: 2021 Jeff Epler 2 # 3 # SPDX-License-Identifier: MIT 4 5 name: Test 6 7 on: 8 push: 9 pull_request: 10 release: 11 types: [published] 12 check_suite: 13 types: [rerequested] 14 15 jobs: 16 pre-commit: 17 runs-on: ubuntu-22.04 18 steps: 19 20 - uses: actions/checkout@v4 21 22 - name: pre-commit 23 uses: pre-commit/action@v3.0.1 24 25 - name: Make patch 26 if: failure() 27 run: git diff > ~/pre-commit.patch 28 29 - name: Upload patch 30 if: failure() 31 uses: actions/upload-artifact@v4 32 with: 33 name: patch 34 path: ~/pre-commit.patch 35 36 test-release: 37 runs-on: ubuntu-22.04 38 steps: 39 - uses: actions/checkout@v4 40 41 - name: Set up Python 42 uses: actions/setup-python@v5 43 with: 44 python-version: 3.11 45 46 - name: install deps 47 run: pip install -r requirements-dev.txt 48 49 - name: check types with mypy 50 run: make 51 52 - name: Build release 53 run: python -mbuild 54 55 - name: Upload artifacts 56 uses: actions/upload-artifact@v4 57 with: 58 name: dist 59 path: dist/*