diff --git a/Dockerfile b/Dockerfile index f1ffa4f..02a7ff7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,35 @@ -# Starting from a minimalist image -FROM ruby:2.7 -# Reference for help contact me -LABEL maintainer="chris@adadev.org" +# Install latest version of node +FROM continuumio/anaconda3:latest -# Create a directory for the app +RUN apt-get update && apt-get install -y \ + build-essential \ + ca-certificates \ + curl \ + sudo \ + openssl \ + libssl-dev libffi-dev \ + --no-install-recommends + +# Create directory for app RUN mkdir /app -# Set the working directory for RUN, ADD and COPY +# Set as current directory for RUN, ADD, COPY commands WORKDIR /app -# Add entire student fork (overwrites previously added files) -ARG SUBMISSION_SUBFOLDER -ADD $SUBMISSION_SUBFOLDER /app +# Add to PATH +ENV PATH /app:$PATH +# Add requirements.txt from upstream +ADD requirements.txt /app +RUN pip install -r /app/requirements.txt -COPY ./Gemfile . -RUN gem install bundler -RUN bundle install +# Add entire student fork (overwrites previously added package.json) +ARG SUBMISSION_SUBFOLDER +ADD $SUBMISSION_SUBFOLDER /app -# Overwrite the script and test files +# Overwrite files in student fork with upstream files ADD test.sh /app -ADD test /app +ADD tests /app/tests -RUN chmod +x test.sh +# User defined requirements +# RUN make init diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 04a9dcd..0000000 --- a/Gemfile +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true -source "https://rubygems.org" - -gem 'rake' -gem 'minitest' -gem 'minitest-spec' -gem 'minitest-reporters' -gem "pry" -gem 'minitest-skip' - diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 1167d71..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,36 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - ansi (1.5.0) - builder (3.2.4) - coderay (1.1.3) - method_source (1.0.0) - minitest (5.14.2) - minitest-reporters (1.4.2) - ansi - builder - minitest (>= 5.0) - ruby-progressbar - minitest-skip (0.0.3) - minitest (~> 5.0) - minitest-spec (0.0.2.1) - minitest (>= 3.0) - pry (0.13.1) - coderay (~> 1.1) - method_source (~> 1.0) - rake (13.0.1) - ruby-progressbar (1.10.1) - -PLATFORMS - ruby - -DEPENDENCIES - minitest - minitest-reporters - minitest-skip - minitest-spec - pry - rake - -BUNDLED WITH - 1.17.2 diff --git a/Rakefile b/Rakefile deleted file mode 100644 index 0c2d13f..0000000 --- a/Rakefile +++ /dev/null @@ -1,9 +0,0 @@ -require 'rake/testtask' - -Rake::TestTask.new do |t| - t.libs = ["lib"] - t.warning = true - t.test_files = FileList['test/*_test.rb'] -end - -task default: :test diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..77ffa3f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +attrs==20.3.0 +iniconfig==1.1.1 +packaging==20.8 +pluggy==0.13.1 +py==1.10.0 +pyparsing==2.4.7 +pytest==6.2.1 +toml==0.10.2 diff --git a/test.sh b/test.sh index 8509a00..1091ef7 100755 --- a/test.sh +++ b/test.sh @@ -1,3 +1,4 @@ #!/bin/bash -rake +pytest -vv +