File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM --platform=$TARGETPLATFORM ruby:3.2.2-slim
2+
3+ # Install dependencies
4+ RUN apt-get update && apt-get install -y --no-install-recommends \
5+ build-essential \
6+ chromium \
7+ libpq-dev \
8+ && rm -rf /var/lib/apt/lists/*
9+
10+ WORKDIR /app
11+
12+ COPY Gemfile ./
13+ COPY Gemfile.lock ./ || true
14+
15+ RUN bundle install
16+
17+ CMD ["irb" ]
Original file line number Diff line number Diff line change 1+ source "https://rubygems.org"
2+
3+ gem 'cucumber'
4+ gem 'rspec'
5+ gem 'headless'
6+ gem 'watir'
7+ gem 'aruba'
8+ gem 'mail'
9+ # gem 'cucumber-api'
10+
11+ gem 'pdf-reader'
12+ gem 'terminal-table'
13+ gem 'awesome_print'
14+ gem 'webdrivers'
15+ gem 'nokogiri'
16+ gem 'watir-nokogiri'
17+ gem 'watir-scroll'
18+ gem 'pg'
19+ gem 'net-ssh-gateway'
20+ gem 'aws-sdk-secretsmanager'
21+ gem 'net-sftp'
22+ # Removed unnecessary gem 'csv' as it is part of Ruby's standard library.
Original file line number Diff line number Diff line change 1- # test-runner
1+ # Test Runner Docker Container
2+
3+ This repository provides a Dockerfile for building an ARM-based container
4+ with Ruby 3.2.2 and several testing gems. The container also installs
5+ Chromium so it can be used for headless browsing.
6+
7+ ## Building
8+
9+ Build the image using Docker's buildx so the container is built for ARM64:
10+
11+ ``` bash
12+ docker buildx build --platform linux/arm64 -t test-runner:arm64 .
13+ ```
14+
15+ The resulting image contains all gems listed in the ` Gemfile ` and can be
16+ used to execute tests or scripts that depend on them.
17+
18+ ## Running with Local Tests
19+
20+ To execute tests stored on your machine, map the directory containing
21+ your test suite to ` /app ` inside the container. For example, if your
22+ tests are located in ` ~/lets-qa/acceptance/ ` , start the container with:
23+
24+ ``` bash
25+ docker run -it --rm -v ~ /lets-qa/acceptance:/app test-runner:arm64 bash
26+ ```
27+
28+ This command launches the container with the current working directory set
29+ to ` /app ` , where your tests are mounted. From there you can run any
30+ commands you need, such as ` bundle exec cucumber ` or ` bundle exec rspec ` .
You can’t perform that action at this time.
0 commit comments