Tests-workflow-sha #29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests-workflow-sha | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: "sha" | |
| required: true | |
| default: "" | |
| permissions: | |
| statuses: write | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ['3.10'] | |
| exclude: | |
| # Reduce matrix size by excluding some combinations | |
| - os: macos-latest | |
| python-version: '3.10' | |
| - os: windows-latest | |
| python-version: '3.10' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - run: git checkout ${{ github.event.inputs.ref }} | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install poetry==2.0.1 | |
| poetry install | |
| - name: Set commit statut as pending | |
| uses: myrotvorets/set-commit-status-action@master | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| status: pending | |
| sha: ${{ github.event.inputs.ref }} | |
| context: Check by workflow-dispatch | |
| - name: Run linters | |
| run: | | |
| poetry run black --check bleak_bumble/ tests/ | |
| poetry run isort --profile black --check-only bleak_bumble/ tests/ | |
| - name: Run tests | |
| run: | | |
| poetry run pytest tests/ -v | |
| - name: Set final commit status | |
| uses: myrotvorets/set-commit-status-action@master | |
| if: always() | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| status: ${{ job.status }} | |
| sha: ${{ github.event.inputs.ref }} | |
| context: Check by workflow-dispatch |