Skip to content

Commit 80671f7

Browse files
committed
CI to run tests with rabbitmq
1 parent 90d8c65 commit 80671f7

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55

66
jobs:
7-
test:
7+
lint:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4
@@ -31,12 +31,39 @@ jobs:
3131
3232
- name: Set up environment vars
3333
run: |
34-
cp env.example src/tp.env
34+
cp env.example src/.env
3535
3636
- name: Run the linter
3737
run: |
3838
source .venv/bin/activate
3939
make lint
40+
test:
41+
runs-on: ubuntu-latest
42+
needs: lint
43+
services:
44+
rabbitmq:
45+
image: rabbitmq:3.12.14-management-alpine
46+
ports:
47+
- 5672:5672
48+
49+
steps:
50+
- uses: actions/checkout@v4
51+
52+
- uses: actions/setup-python@v5
53+
id: setup-python
54+
with:
55+
python-version-file: '.python-version'
56+
57+
- name: Set up environment vars
58+
run: |
59+
cp env.example src/.env
60+
61+
- uses: actions/cache/restore@v4
62+
id: cache-dependencies
63+
with:
64+
path: |
65+
.venv
66+
key: ${{ runner.os }}-venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/*requirements.txt') }}
4067

4168
- name: Run the tests
4269
run: |

0 commit comments

Comments
 (0)