Skip to content

CI

CI #1911

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 0 * * *" # Daily “At 00:00”
workflow_dispatch: # allows you to trigger manually
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
JUPYTER_FORWARD_ENABLE_SSH_TESTS: true
JUPYTER_FORWARD_SSH_TEST_USER: runner
JUPYTER_FORWARD_SSH_TEST_HOSTNAME: localhost.local
JUPYTER_FORWARD_TEST_SHELLS: '["bash", "tcsh", "zsh", null]'
jobs:
build:
name: python-${{ matrix.python-version }}
if: github.repository == 'ncar-xdev/jupyter-forward'
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure SSH key for localhost
run: |
.github/scripts/ssh_setup.sh
- name: Install missing shells e.g. zsh and tcsh
run: |
sudo apt-get update
sudo apt-get install zsh tcsh
cat /etc/shells
- uses: conda-incubator/setup-miniconda@master
with:
channels: conda-forge
channel-priority: strict
activate-environment: jupyter-forward-dev
auto-update-conda: false
python-version: ${{ matrix.python-version }}
mamba-version: "*"
use-mamba: true
miniforge-variant: Mambaforge
environment-file: ci/environment.yml
- name: Install jupyter-forward
run: |
python -m pip install -e . --no-deps --force-reinstall
conda list
- name: Run Tests
run: |
python -m pytest
- name: Upload code coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false