|
34 | 34 | - name: Unit tests
|
35 | 35 | run: pytest
|
36 | 36 |
|
| 37 | + style: |
| 38 | + runs-on: ubuntu-22.04 |
| 39 | + permissions: |
| 40 | + statuses: write |
| 41 | + env: |
| 42 | + GH_TOKEN: ${{ github.token }} |
| 43 | + steps: |
| 44 | + - uses: actions/checkout@v4 |
| 45 | + with: |
| 46 | + fetch-depth: 0 |
| 47 | + - uses: actions/setup-python@v5 |
| 48 | + with: |
| 49 | + python-version: '3.11' |
| 50 | + - name: Install dependencies |
| 51 | + run: pip install ruff |
| 52 | + - name: Ruff output to file |
| 53 | + run: ruff check -ne -o ruff.log --output-format concise |
| 54 | + - name: Ruff output as annotations |
| 55 | + run: echo "$(ruff check -e --output-format github)" |
| 56 | + - name: Process Ruff output |
| 57 | + run: python devops/style_assistant.py ${{ github.run_id }} ${{ github.job }} ${{ github.event.pull_request.head.sha }} |
| 58 | + - name: Report status |
| 59 | + run: gh api ${{ env.DEVOPS_ASST_API_ARGS }} |
| 60 | + |
| 61 | + |
| 62 | + typing: |
| 63 | + runs-on: ubuntu-22.04 |
| 64 | + permissions: |
| 65 | + statuses: write |
| 66 | + env: |
| 67 | + GH_TOKEN: ${{ github.token }} |
| 68 | + steps: |
| 69 | + - uses: actions/setup-python@v5 |
| 70 | + with: |
| 71 | + python-version: '3.11' |
| 72 | + - name: Python Version |
| 73 | + run: python --version |
| 74 | + - name: Update Pip |
| 75 | + run: python -m pip install --upgrade pip |
| 76 | + - name: Install dependencies |
| 77 | + run: pip install build setuptools pandas-stubs types-tqdm pyright |
| 78 | + - uses: actions/checkout@v4 |
| 79 | + with: |
| 80 | + ref: main |
| 81 | + fetch-depth: 0 |
| 82 | + - name: Build package |
| 83 | + run: python -m build --sdist |
| 84 | + - name: Install rsatoolbox |
| 85 | + run: pip install dist/* |
| 86 | + - name: Pyright (on main) |
| 87 | + continue-on-error: true |
| 88 | + run: pyright > pyright_main.log |
| 89 | + - name: Uninstall rsatoolbox |
| 90 | + run: pip uninstall -y rsatoolbox |
| 91 | + - name: Remove builds |
| 92 | + run: rm dist/* |
| 93 | + - uses: actions/checkout@v4 |
| 94 | + with: |
| 95 | + clean: false |
| 96 | + fetch-depth: 0 |
| 97 | + - name: Build package |
| 98 | + run: python -m build --sdist |
| 99 | + - name: Install rsatoolbox |
| 100 | + run: pip install dist/* |
| 101 | + - name: Pyright (on PR) |
| 102 | + continue-on-error: true |
| 103 | + run: pyright > pyright_pr.log |
| 104 | + - name: Process Pyright output |
| 105 | + run: python devops/typing_assistant.py ${{ github.run_id }} ${{ github.job }} ${{ github.event.pull_request.head.sha }} |
| 106 | + - name: Report status |
| 107 | + run: gh api ${{ env.DEVOPS_ASST_API_ARGS }} |
| 108 | + |
| 109 | + |
37 | 110 | source:
|
38 | 111 | needs: tests
|
39 | 112 | runs-on: ${{ matrix.os }}
|
|
0 commit comments