Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into s3logs
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Jul 2, 2021
2 parents 0d28357 + 38e7e7b commit 8cadb5b
Show file tree
Hide file tree
Showing 94 changed files with 2,645 additions and 2,660 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
build_docs:
# This is the base environment that Circle will use
docker:
- image: circleci/python:3.6-stretch
- image: circleci/python:3.8-buster
steps:
# Get our data and merge with upstream
- run: sudo apt-get update
Expand Down
6 changes: 4 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# show coverage in CI status, not as a comment.
# show coverage in CI status, not as a comment.
comment: off
fixes:
- "*/site-packages/::"
coverage:
status:
project:
default:
target: auto
patch:
default:
target: 20%
target: 20%
13 changes: 13 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
[run]
# this file comes from versioneer and we don't test it
omit = */_version.py

[paths]
# This tells coverage how to combine results together or said differently
# which files at different paths are actually the same file
# documented at https://coverage.readthedocs.io/en/latest/config.html#paths
# Yes, we list repo2docker twice here. This allows you to install repo2docker
# with `pip install -e.` for local development and from the wheel (as done on
# CI) and get `repo2docker/foo.py` as paths in the coverage report
source =
repo2docker
repo2docker
../repo2docker
*/site-packages/repo2docker
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:

# https://github.com/docker/build-push-action
- name: Build Docker image
uses: docker/build-push-action@v1
uses: docker/build-push-action@v2
with:
repository: jupyter/repo2docker
tags: pr
context: .
tags: jupyter/repo2docker:pr
push: false

- name: Run repo2docker Docker image
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Create a release on pypi.org

on:
push:
pull_request:

jobs:
build-n-publish:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2

- name: "Setup Python 3.8"
uses: actions/setup-python@v2
with:
python-version: "3.8"

- name: "Install dependencies"
run: |
pip install --upgrade setuptools pip
pip install --upgrade -r dev-requirements.txt
pip freeze
- name: "Build distribution archives"
run: |
python setup.py sdist bdist_wheel
# This step is only run when a new tag is pushed
# all previous steps always run in order to exercise them
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
21 changes: 14 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@

name: Continuous Integration

# Only trigger the workflow when pushing to master
on:
- push
- pull_request
push:
pull_request:
schedule:
# Weekly test so we know if tests break for external reasons
# https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#scheduled-events
- cron: '36 10 * * 0'

# Global environment variables
env:
Expand Down Expand Up @@ -74,7 +77,6 @@ jobs:
- nix
- pipfile
- r
- stencila-py
- unit
- venv
include:
Expand Down Expand Up @@ -108,11 +110,16 @@ jobs:
pip freeze
# hg-evolve pinned to 9.2 because hg-evolve dropped support for
# hg 4.5, installed with apt in Ubuntu 18.04
$(hg debuginstall --template "{pythonexe}") -m pip install setuptools --user
$(hg debuginstall --template "{pythonexe}") -m pip install hg-evolve==9.2 --user
- name: "Run tests"
run: |
pytest --durations 10 --cov repo2docker -v tests/${{ matrix.repo_type }}
cd tests
pytest --durations 10 --cov repo2docker -v ${{ matrix.repo_type }}
# Action Repo: https://github.com/codecov/codecov-action
- uses: codecov/codecov-action@v1
- name: "Upload code coverage stats"
run: |
pip install codecov
pushd tests && codecov && cat
cat /home/runner/work/repo2docker/repo2docker/tests/coverage.xml
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ There are a few other pages to highlight:
Its a good place to understand _why_ the team have made the decisions that they have along the way!
* We absolutely encourage discussion around refactoring, updating or extending repo2docker, but please make sure that you've understood this page before opening an issue to discuss the change you'd like to propose.
* [Common developer tasks and how-tos](https://repo2docker.readthedocs.io/en/latest/contributing/tasks.html)
* Some notes on running tests, buildpack dependencies, creating a release, updating the changelog and keeping the pip files up to date.
* Some notes on running tests, buildpack dependencies, creating a release, and keeping the pip files up to date.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG ALPINE_VERSION=3.12.0
FROM alpine:${ALPINE_VERSION}

RUN apk add --no-cache git python3 python3-dev py-pip
RUN apk add --no-cache git python3 python3-dev py-pip build-base

# build wheels in first image
ADD . /tmp/src
Expand Down Expand Up @@ -30,5 +30,10 @@ RUN pip3 install --no-cache-dir /tmp/wheelhouse/*.whl \
COPY ./docker/git-credential-env /usr/local/bin/git-credential-env
RUN git config --system credential.helper env

# add entrypoint
COPY ./docker/entrypoint /usr/local/bin/entrypoint
RUN chmod +x /usr/local/bin/entrypoint
ENTRYPOINT ["/usr/local/bin/entrypoint"]

# Used for testing purpose in ports.py
EXPOSE 52000
Loading

0 comments on commit 8cadb5b

Please sign in to comment.