-
Notifications
You must be signed in to change notification settings - Fork 386
75 lines (62 loc) · 2.02 KB
/
step_tests-conda.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: test-conda
run-name: Run Conda tests for different OS
on:
workflow_call:
inputs:
coverage:
type: boolean
description: Upload coverage to CodeCov
default: true
permissions:
contents: read
jobs:
test-conda:
name: >
${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache conda
uses: actions/cache@v3
with:
path: ~/conda_pkgs_dir
key: conda-${{ matrix.os }}-${{ hashFiles('.ci/environment-ci.yml') }}
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
activate-environment: jupytext-ci
environment-file: .ci/environment-ci.yml
- name: Install from source
run: HATCH_BUILD_HOOKS_ENABLE=true python -m pip install -e '.[test-external,test-cov]'
- name: Conda list
run: conda list
- name: Install a Jupyter Kernel
run: python -m ipykernel install --name jupytext-ci --user
- name: Test with pytest
run: pytest -n logical --cov --cov-report=xml
- name: Test lab extension
run: |
# Uninstall jupyter-fs as it overrides the original browser-test.js to
# check its own functionality (https://github.com/jpmorganchase/jupyter-fs/blob/main/jupyterfs/browser-test.js)
# So uninstall jupyter-fs before running browser check
#
pip uninstall jupyter-fs -y
# Check extension
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-jupytext.*OK"
python -m jupyterlab.browser_check
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
verbose: true
if: inputs.coverage