-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: nbstripout | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# os: [ubuntu-latest, macos-latest, windows-latest] | ||
os: [windows-latest] | ||
# python-version: [3.5, 3.6, 3.7, 3.8] | ||
python-version: [3.5] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade setuptools wheel | ||
# traitlets 4 does not support Python < 3.7 | ||
python -m pip install pytest 'traitlets<5' nbformat | ||
python setup.py install | ||
- name: Configure Git | ||
run: git config --global init.defaultBranch main | ||
- name: Run tests (Linux) | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
python setup.py test | ||
- name: Run tests (MacOS) | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
# Ignore test-hg.t as Mercurial is not installed | ||
echo 'cramignore = test-hg.t' >> pytest.ini | ||
python setup.py test | ||
- name: Windows specific configuration | ||
if: matrix.os == 'windows-latest' | ||
shell: bash | ||
env: | ||
NBSTRIPOUT_EXE: ${{ env.pythonLocation }}\Scripts\nbstripout.exe | ||
run: | | ||
env | ||
git config --global core.autocrlf true | ||
echo NBSTRIPOUT_EXE=${NBSTRIPOUT_EXE} | ||
${NBSTRIPOUT_EXE} --help |