Skip to content

Commit

Permalink
Merge pull request #1371 from cuthbertLab/test-protected-branch-workflow
Browse files Browse the repository at this point in the history
Test protected branch workflow
  • Loading branch information
mscuthbert authored Aug 11, 2022
2 parents 6715d54 + d5e06ba commit ee04424
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maincheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10"]
python-version: [3.8, 3.9, "3.10"] # "3.10" must be in quotes to not have it eval to 3.1
steps:
- uses: actions/setup-python@v2
with:
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Run Main Test script
run: python -c 'from music21.test.testSingleCoreAll import ciMain as ci; ci()'
- name: Coveralls
if: ${{ matrix.python-version == '3.8' }}
if: ${{ matrix.python-version == '3.9' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
Expand Down
4 changes: 3 additions & 1 deletion music21/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,9 @@ def realize(self,
the "main note" itself (or None) to keep processing for ornaments,
and a list of notes after the "main note".
Added in v.8 -- inPlace boolean.
Added in v.8 -- inPlace boolean; note that some ornaments
might not return a Note in the second position at all (such as trills)
so inPlace does nothing.
'''
if not inPlace:
srcObj = copy.deepcopy(srcObj)
Expand Down
17 changes: 14 additions & 3 deletions music21/test/coverageM21.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,24 @@
r'\s*music21.mainTest\(\)\s*',
r'.*#\s*pragma:\s*no cover.*',
r'class TestExternal.*',
r'class TestSlow.*',
]


def getCoverage(overrideVersion=False):
# Note the .minor == 8 -- that makes it only run on 3.8
# run on Py 3.8 -- to get Py 3.9/3.10 timing...
if overrideVersion or sys.version_info.minor == 8:
# Run this on a middle Python version so that we can
# check timing of newest vs oldest, AND so that
# we can quickly see failures on newest and oldest.
# (The odds of a failure on the middle version are low if
# the newest and oldest are passing)
#
# Note the .minor == 9 -- that makes it only run on 3.9
# run on Py 3.9 -- to get Py 3.8/3.10 timing...
#
# When changing the version, be sure also to change
# .github/maincheck.yml's line:
# if: ${{ matrix.python-version == '3.9' }}
if overrideVersion or sys.version_info.minor == 9:
try:
# noinspection PyPackageRequirements
import coverage # type: ignore
Expand Down

0 comments on commit ee04424

Please sign in to comment.