Skip to content

tuning: Avoid crash in PerformancePowerProfile #59

tuning: Avoid crash in PerformancePowerProfile

tuning: Avoid crash in PerformancePowerProfile #59

Workflow file for this run

name: Python check
on:
pull_request:
branches: [ "main" ]
jobs:
build:
name: Check if every commit in the PR works
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Compute PR fetch depth
shell: bash
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits || 1 }} + 1 ))" >> "${GITHUB_ENV}"
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Test every commit in the PR for Python ${{ matrix.python-version }}
run: |
COMMITS=$(git rev-list ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }})
for commit in $COMMITS; do
git checkout $commit || exit 1
git show --no-patch --format='Testing commit %h %s'
make check || exit 1
done