Skip to content

Commit eb30e4a

Browse files
Merge pull request #292 from mishaschwartz/v2.0.0
v2.0.0
2 parents a91633e + 68151bc commit eb30e4a

File tree

171 files changed

+2121
-4525
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+2121
-4525
lines changed

.dockerfiles/Dockerfile

Lines changed: 0 additions & 28 deletions
This file was deleted.

.dockerfiles/docker-config.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.dockerfiles/entrypoint-dev.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/test_ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Autotester tests
2+
on:
3+
pull_request:
4+
types: [ opened, synchronize, reopened, ready_for_review ]
5+
jobs:
6+
test:
7+
if: github.event.pull_request.draft == false
8+
runs-on: ubuntu-18.04
9+
strategy:
10+
matrix:
11+
python-version:
12+
- 3.6
13+
- 3.7
14+
- 3.8
15+
- 3.9
16+
test-dir:
17+
- client
18+
- server
19+
name: ${{ matrix.test-dir }} tests with python ${{ matrix.python-version }}
20+
env:
21+
AUTOTESTER_CONFIG: server/autotest_server/tests/fixtures/test_config.yml
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Setup python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Cache pip
29+
uses: actions/cache@v2
30+
with:
31+
path: ~/.cache/pip
32+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
33+
restore-keys: |
34+
${{ runner.os }}-pip-
35+
- name: Install python packages
36+
run: python -m pip install pytest fakeredis -r ${{ matrix.test-dir }}/requirements.txt
37+
- name: run tests
38+
run: pytest ${{ matrix.test-dir }}

.gitignore

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,3 @@ __pycache__
99
venv
1010
venv2
1111
build
12-
13-
# tmp files
14-
.installed
15-
16-
# bin
17-
bin/kill_worker_procs
18-
19-
# server
20-
src/autotester/server/venv
21-
src/autotester/server/workspace
22-
src/autotester/server/bin/kill_worker_procs
23-
24-
# testers
25-
src/autotester/testers/*/specs/.installed
26-
src/autotester/testers/*/specs/install_settings.json
27-
28-
# java
29-
src/autotester/testers/java/lib/*.jar
30-
31-
# racket
32-
src/autotester/testers/racket/**/compiled/
33-
34-
# haskell
35-
markus_cabal

.travis.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# CHANGELOG
22
All notable changes to this project will be documented here.
33

4+
## [v2.0.0]
5+
- Full rewrite of autotester with a server/client architecture (#283)
6+
- Add Jupyter tester (#284)
7+
48
## [v1.10.3]
59
- Fix bug where zip archive was unpacked two levels deep instead of just one (#271)
610
- Pass PGHOST and PGINFO environment variables to tests (#272)

Layerfile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,17 @@ RUN apt-get update && \
44
apt-get -y install python3 python3-pip python3-venv && \
55
rm -rf /var/lib/apt/lists/*
66

7-
RUN python3 -m venv /tmp/venv
8-
97
WORKDIR /app
108
COPY . .
11-
RUN /tmp/venv/bin/python setup.py test
9+
10+
RUN python3 -m venv /tmp/venv-server && \
11+
/tmp/venv-server/bin/pip install -r /app/server/requirements.txt && \
12+
/tmp/venv-server/bin/pip install pytest fakeredis
13+
14+
RUN python3 -m venv /tmp/venv-client && \
15+
/tmp/venv-client/bin/pip install -r /app/client/requirements.txt && \
16+
/tmp/venv-client/bin/pip install pytest fakeredis
17+
18+
RUN AUTOTESTER_CONFIG=/app/server/autotest_server/tests/fixtures/test_config.yml /tmp/venv-server/bin/pytest /app/server
19+
20+
RUN /tmp/venv-client/bin/pytest /app/client

MANIFEST.in

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ The autotester currently supports testers for the following languages and testin
7777
- [Pytest](https://docs.pytest.org/en/latest/)
7878
- `pyta`
7979
- [PythonTa](https://github.com/pyta-uoft/pyta)
80+
- `jupyter`
81+
- [Jupyter Notebook](https://jupyter.org/)
8082
- `racket`
8183
- [RackUnit](https://docs.racket-lang.org/rackunit/)
8284
- `custom`
@@ -118,32 +120,25 @@ workspace: # an absolute path to a directory containing all files/workspaces req
118120
server_user: # the username of the user designated to run the autotester itself. Default is the current user
119121

120122
workers:
121-
- users:
122-
- name: # the username of a user designated to run tests for the autotester
123-
reaper: # the username of a user used to clean up test processes. This value can be null (see details below)
123+
- user: # the username of a user designated to run tests for the autotester
124124
queues: # a list of queue names that these users will monitor and select test jobs from.
125125
# The order of this list indicates which queues have priority when selecting tests to run
126126
# This list may only contain the strings 'high', 'low', and 'batch'.
127127
# default is ['high', 'low', 'batch']
128+
resources:
129+
port: # set a range of ports available for use by this test user (see details below).
130+
min: 50000 # For example, this sets the range of ports from 50000 to 65535
131+
max: 65535
132+
postgresql_url: # url to an empty postgres database for use in running tests, should be unique for each user
128133

129-
redis:
130-
url: # url for the redis database. default is: redis://127.0.0.1:6379/0
134+
redis_url: # url for the redis database. default is: redis://127.0.0.1:6379/0
131135

132-
supervisor:
133-
url: # url used by the supervisor process. default is: '127.0.0.1:9001'
136+
supervisor_url: # url used by the supervisor process. default is: '127.0.0.1:9001'
134137

135138
rlimit_settings: # RLIMIT settings (see details below)
136139
nproc: # for example, this setting sets the hard and soft limits for the number of processes available to 300
137140
- 300
138141
- 300
139-
140-
resources:
141-
port: # set a range of ports available for use by the tests (see details below).
142-
min: 50000 # For example, this sets the range of ports from 50000 to 65535
143-
max: 65535
144-
postgresql:
145-
port: # port the postgres server is running on
146-
host: # host the postgres server is running on
147142
```
148143
149144
### Environment variables
@@ -170,13 +165,6 @@ resources:
170165
171166
### autotesting configuration details
172167
173-
#### reaper users
174-
175-
Each reaper user is associated with a single worker user. The reaper user's sole job is to safely kill any processes
176-
still running after a test has completed. If these users do not exist before the server is installed they will be created.
177-
If no reaper username is given in the configuration file, no new users will be created and tests will be terminated in a
178-
slightly less secure way (though probably still good enough for most cases).
179-
180168
#### rlimit settings
181169
182170
Rlimit settings allow the user to specify how many system resources should be allocated to each worker user when

0 commit comments

Comments
 (0)