Skip to content

Commit

Permalink
Improve readme, add run_tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
epandurski committed Sep 4, 2022
1 parent f7f2f61 commit 7a48ef4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 14 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Run tests
on:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Create .env file
run: cp development.env .env

- name: Build docker image
run: docker-compose build

- name: Run tests in docker container
run: docker-compose run tests-config test
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,19 @@ How to run the tests
$ docker-compose build
$ docker-compose run tests-config test


How to setup a development environment
--------------------------------------

1. Install [Poetry](https://poetry.eustace.io/docs/).

2. Create a new [Python](https://docs.python.org/) virtual
environment and activate it.

3. To install dependencies, run this command:

$ poetry install

4. To run the minimal set of services needed for development, use
this command:

Expand All @@ -224,20 +237,7 @@ How to run the tests
the RabbitMQ connection URLs accordingly (`PROTOCOL_BROKER_URL` in
the *.env* file).


How to setup a development environment
--------------------------------------

1. Install [Poetry](https://poetry.eustace.io/docs/).

2. Create a new [Python](https://docs.python.org/) virtual
environment and activate it.

3. To install dependencies, run this command:

$ poetry install

4. You can use `flask run -p 5000` to run a local web server, and
5. You can use `flask run -p 5000` to run a local web server, and
`pytest --cov=swpt_creditors --cov-report=html` to run the tests
and generate a test coverage report.

Expand Down

0 comments on commit 7a48ef4

Please sign in to comment.