Merge pull request #82 from Abjad/trevor/clean-up-gitignore #174
This file contains 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: abjad-ext-nauert | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
lilypond-version: ["2.25.23"] | |
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: | | |
echo "MYPYPATH=$MYPYPATH:/tmp/abjad" >> $GITHUB_ENV | |
PATH="/tmp/lilypond-${{ matrix.lilypond-version }}/bin:home/runner/bin:$PATH" | |
echo "PATH=$PATH" >> $GITHUB_ENV | |
echo "PYTHONUNBUFFERED=TRUE" >> $GITHUB_ENV | |
- name: Log environment variables | |
run: | | |
echo "HOME: $HOME" | |
echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE" | |
echo "MYPYPATH: $MYPYPATH" | |
echo "PATH: $PATH" | |
echo "PYTHONUNBUFFERED: ${PYTHONUNBUFFERED:-not set}" | |
echo "PYTHONPATH: ${PYTHONPATH:-not set}" | |
- name: Install LilyPond | |
uses: Abjad/install-lilypond@main | |
with: | |
lilypond-version: ${{ matrix.lilypond-version }} | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r ci/requirements.txt --no-cache-dir | |
- name: Install Abjad | |
run: | | |
git clone https://github.com/Abjad/abjad.git /tmp/abjad | |
pip install /tmp/abjad | |
- name: Install this repo | |
run: | | |
# Namespace packages require -e installation; | |
# remove -e after Nauert is changed back to a vanilla package | |
python -m pip install -e . | |
- name: Log Python dependencies | |
run: | | |
black --version | |
flake8 --version | |
isort --version | |
mypy --version | |
pip --version | |
pytest --version | |
- name: Run lints | |
run: | | |
make black-check | |
make flake8 | |
make isort-check | |
make mypy | |
- name: Run tests | |
run: | | |
make pytest |