Skip to content

Add GitHub Actions workflow dispatch ("run workflow" button) (#1639) #599

Add GitHub Actions workflow dispatch ("run workflow" button) (#1639)

Add GitHub Actions workflow dispatch ("run workflow" button) (#1639) #599

Workflow file for this run

name: abjad
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
ci-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13"]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: >
${{ runner.os }}-pip-
${{ matrix.python-version }}-
${{ hashFiles('ci/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Write environment variables
run: |
export LILYPOND_VERSION=2.25.22
echo "LILYPOND_VERSION=${LILYPOND_VERSION}" >> $GITHUB_ENV
string="PATH=/tmp/lilypond-${LILYPOND_VERSION}/bin:/home/runner/bin:$PATH"
echo $string >> $GITHUB_ENV
echo "PYTHONUNBUFFERED=TRUE" >> $GITHUB_ENV
- name: Log environment variables
run: |
echo "HOME: $HOME"
echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE"
echo "PATH: $PATH"
echo "PYTHONPATH: ${PYTHONPATH:-not set}"
- name: Install LilyPond
uses: trevorbaca/install-lilypond@v2.25.22
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ci/requirements.txt --no-cache-dir
- name: Log dependencies
run: |
black --version
flake8 --version
isort --version
mypy --version
pip --version
pytest --version
- name: Install Abjad
run: |
python -m pip install .
python -c "import abjad; print(abjad.Configuration().configuration_file_path)"
python scr/prime_parser_tables.py 2>/dev/null
- name: Run checks
run: |
make black-check
make flake8
make isort-check
make mypy
- name: Run tests
run: |
make pytest