Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop installing custom python versions #3484

Merged
merged 4 commits into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
/.bundle
/.core-bash_history
/.env
/.envrc
/.git
/tmp/
/helpers
/spec
gitignored
/bundler/helpers/helpers/
/python/helpers/helpers/
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what this was ignoring

/.vscode-server-insiders/
/.vscode-server/
/.vscode/
/dependabot-*.gem
/dry-run
/pkg
/vendor
/tmp
**/.bundle
**/coverage
**/Gemfile.lock
**/node_modules
!**/spec/fixtures/*
git.store
.byebug_history
.DS_Store
*.pyc
29 changes: 21 additions & 8 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
FROM dependabot/dependabot-core

# We pre-install these versions of python as they're known to be used in the
# test suite. These used to be installed in-line, and pre-installing them helps
# with the performance of the python test suite.
RUN pyenv install -s 3.6.13 \
&& pyenv install -s 3.7.1 \
&& pyenv install -s 3.7.10 \
&& git config --global user.name dependabot-ci \
RUN git config --global user.name dependabot-ci \
&& git config --global user.email [email protected]

ARG CODE_DIR=/home/dependabot/dependabot-core
WORKDIR ${CODE_DIR}
COPY --chown=dependabot:dependabot . ${CODE_DIR}

COPY --chown=dependabot:dependabot .rubocop.yml ${CODE_DIR}/.rubocop.yml
COPY --chown=dependabot:dependabot omnibus ${CODE_DIR}/omnibus
COPY --chown=dependabot:dependabot dep ${CODE_DIR}/dep
COPY --chown=dependabot:dependabot git_submodules ${CODE_DIR}/git_submodules
COPY --chown=dependabot:dependabot terraform ${CODE_DIR}/terraform
COPY --chown=dependabot:dependabot github_actions ${CODE_DIR}/github_actions
COPY --chown=dependabot:dependabot hex ${CODE_DIR}/hex
COPY --chown=dependabot:dependabot elm ${CODE_DIR}/elm
COPY --chown=dependabot:dependabot docker ${CODE_DIR}/docker
COPY --chown=dependabot:dependabot nuget ${CODE_DIR}/nuget
COPY --chown=dependabot:dependabot maven ${CODE_DIR}/maven
COPY --chown=dependabot:dependabot gradle ${CODE_DIR}/gradle
COPY --chown=dependabot:dependabot cargo ${CODE_DIR}/cargo
COPY --chown=dependabot:dependabot composer ${CODE_DIR}/composer
COPY --chown=dependabot:dependabot go_modules ${CODE_DIR}/go_modules
COPY --chown=dependabot:dependabot python ${CODE_DIR}/python
COPY --chown=dependabot:dependabot npm_and_yarn ${CODE_DIR}/npm_and_yarn
COPY --chown=dependabot:dependabot bundler ${CODE_DIR}/bundler
COPY --chown=dependabot:dependabot common ${CODE_DIR}/common
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,10 @@
let(:requirements_file) do
Dependabot::DependencyFile.new(
name: "runtime.txt",
content: "python-3.7.1"
content: fixture(
"requirements",
"version_not_specified_runtime.txt"
)
)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
require "dependabot/dependency_file"
require "dependabot/python/update_checker/pipenv_version_resolver"

namespace = Dependabot::Python::UpdateChecker
RSpec.describe namespace::PipenvVersionResolver do
RSpec.describe Dependabot::Python::UpdateChecker::PipenvVersionResolver do
let(:resolver) do
described_class.new(
dependency: dependency,
Expand Down
2 changes: 1 addition & 1 deletion python/spec/fixtures/pip_compile_files/met_marker.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
flaky; python_version < '3.7'
flaky; python_version < '2.8'
pytest
pytest-xdist
mock
Expand Down
2 changes: 1 addition & 1 deletion python/spec/fixtures/pyproject_files/exact_version.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ authors = ["Dependabot <[email protected]>"]
description = "Various small python projects."

[tool.poetry.dependencies]
python = "^3.7"
python = "*"
requests = "2.18.0"
2 changes: 1 addition & 1 deletion python/spec/fixtures/pyproject_locks/exact_version.lock
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ version = "1.21.1"
[metadata]
content-hash = "a8d5762e953227a34625a209e9cc67a1c6fb2d7a971845829cf2f9cf61a5bd7c"
platform = "*"
python-versions = "^3.7"
python-versions = "*"

[metadata.hashes]
certifi = ["13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7", "9fa520c1bacfb634fa7af20a76bcbd3d5fb390481724c597da32c719a7dca4b0"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ apipkg==1.5 # via execnet
atomicwrites==1.3.0 # via pytest
attrs==17.3.0
execnet==1.6.0 # via pytest-xdist
flaky==3.5.0 ; python_version < "3.7"
flaky==3.5.0 ; python_version < "2.8"
mock==3.0.3
more-itertools==7.0.0 # via pytest
pluggy==0.9.0 # via pytest
Expand Down