Skip to content

Commit

Permalink
ci: stop using pip cache, add workflow_dispatch, and cleanup misc
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Jun 24, 2021
1 parent 183e5e8 commit 4293c7b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 24 deletions.
40 changes: 16 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,7 @@ name: Tests
on:
pull_request:
push:

defaults:
run:
# Declare bash be used by default in this workflow's "run" steps.
#
# NOTE: bash will by default run with:
# --noprofile: Ignore ~/.profile etc.
# --norc: Ignore ~/.bashrc etc.
# -e: Exit directly on errors
# -o pipefail: Don't mask errors from a command piped into another command
shell: bash
workflow_dispatch:

jobs:
test:
Expand All @@ -32,15 +22,19 @@ jobs:
with:
python-version: '3.8'

# preserve pip cache to speed up installation
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('*requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# DISABLED: Since we don't pin our dependencies in dev-requirements.txt
# and only refresh the cache when it changes, we end up with a
# cache that remains for too long and cause failures. Due to
# this, it has been disabled.
#
# - name: Cache pip dependencies
# uses: actions/cache@v2
# with:
# path: ~/.cache/pip
# # Look to see if there is a cache hit for the corresponding requirements file
# key: ${{ runner.os }}-pip-${{ hashFiles('*requirements.txt') }}
# restore-keys: |
# ${{ runner.os }}-pip-

- name: Install dependencies
run: |
Expand All @@ -51,7 +45,5 @@ jobs:

- name: Run tests
run: |
# Install nbgitpuller + dependencies
pip install -e .
# Run tests
py.test --cov nbgitpuller
pip install .
pytest --verbose --maxfail=2 --color=yes --cov nbgitpuller
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# [nbgitpuller](https://github.com/jupyterhub/nbgitpuller)


[![GitHub Workflow Status - Test](https://img.shields.io/github/workflow/status/jupyterhub/nbgitpuller/Tests?logo=github&label=tests)](https://github.com/jupyterhub/nbgitpuller/actions)
[![CircleCI build status](https://img.shields.io/circleci/build/github/jupyterhub/nbgitpuller?logo=circleci&label=docs)](https://circleci.com/gh/jupyterhub/nbgitpuller)
[![](https://img.shields.io/pypi/v/nbgitpuller.svg?logo=pypi)](https://pypi.python.org/pypi/nbgitpuller)
Expand Down

0 comments on commit 4293c7b

Please sign in to comment.