Skip to content

Clean up main.yml

Clean up main.yml #561

Workflow file for this run

name: abjad
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
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@v3
with:
python-version: ${{ matrix.python-version }}
- name: Cache dependencies
uses: actions/cache@v3
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
echo "PATH=/tmp/lilypond-${LILYPOND_VERSION}/bin:/home/runner/bin:$PATH" \
>> $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
- name: Install LilyPond
run: |
lilypond_archive="lilypond-${LILYPOND_VERSION}-linux-x86_64.tar.gz"
base_url="https://gitlab.com/lilypond/lilypond/-/releases"
lilypond_url="${base_url}/v${LILYPOND_VERSION}/downloads/${lilypond_archive}"
echo "Downloading LilyPond from: ${lilypond_url}"
cd /tmp || { echo "Failed to change directory to /tmp"; exit 1; }
wget -q ${lilypond_url}
if [ ! -f "${lilypond_archive}" ]; then
echo "File download failed!" >&2
exit 1
fi
checksum="3e837e811aaa72323863925f0a4b5bd1aff1ed9b997e6c70dbe5c008e47872e7"
echo "${checksum} ${lilypond_archive}" > checksum.txt
if ! sha256sum -c checksum.txt --status; then
echo "Checksum verification failed!" >&2
exit 1
fi
rm checksum.txt
echo "Checksum verified successfully."
tar -xf "${lilypond_archive}"
lilypond --version
- name: Install dependencies
run: |
python -m pip install --upgrade pip coverage defusedxml
python -m pip install -r ci/requirements.txt
- name: Log dependencies
run: |
black --version
flake8 --version
isort --version
mypy --version
pip --version
pytest --version
- name: Install Abjad
run: |
python -m pip install .[dev]
python -c "import abjad; print(abjad.Configuration().configuration_file_path)"
scr/prime-parser-tables
- name: Run checks
run: |
make black-check
make flake8
make isort-check
make mypy
- name: Run tests
run: |
make pytest