Skip to content

Tests-workflow-sha

Tests-workflow-sha #29

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