Skip to content

Commit

Permalink
Add CircleCI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
1tayH committed Jun 29, 2018
1 parent ec4f27e commit 3c71ff1
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 4 deletions.
42 changes: 42 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 2
jobs:
build:
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
- image: circleci/python:2.7

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run:
name: install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}

- run:
name: run script
command: |
. venv/bin/activate
python noisy.py --config config.json
- store_artifacts:
path: test-reports
destination: test-reports

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ FROM python:2.7-alpine
RUN pip install requests
WORKDIR /
COPY . /
ENTRYPOINT ["python", "gen.py"]
ENTRYPOINT ["python", "noisy.py"]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ cd noisy
Run the script

```
python gen.py --config config.json
python noisy.py --config config.json
```

The program can accept a number of command line arguments:
```
$ python gen.py --help
usage: gen.py [-h] [--log -l] [--config -c]
$ python noisy.py --help
usage: noisy.py [-h] [--log -l] [--config -c]
optional arguments:
-h, --help show this help message and exit
Expand Down
File renamed without changes.

0 comments on commit 3c71ff1

Please sign in to comment.