-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (56 loc) · 2.07 KB
/
pytest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: pytest varys
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout certificate generator
uses: actions/checkout@v3
with:
repository: rabbitmq/tls-gen
path: tls-gen
- name: Generate certificates
run: |
ls
cd tls-gen/basic
make
make verify
make info
cd -
mv -v tls-gen/basic/result/ca_certificate.pem .rabbitmq/ca_certificate.pem
mv -v tls-gen/basic/result/server_*_certificate.pem .rabbitmq/server_localhost_certificate.pem
mv -v tls-gen/basic/result/server_*_key.pem .rabbitmq/server_localhost_key.pem
mv -v tls-gen/basic/result/client_*_certificate.pem .rabbitmq/client_certificate.pem
mv -v tls-gen/basic/result/client_*_key.pem .rabbitmq/client_key.pem
chmod a+rwx .rabbitmq/*
- name: Run RabbitMQ server
run: |
docker run -d -v ./.rabbitmq:/.rabbitmq -e RABBITMQ_CONFIG_FILE=/.rabbitmq/rabbitmq.conf -p 5671:5671 -p 5672:5672 rabbitmq
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov
- name: Install Varys
run: python3 -m pip install -e .
- name: Test with pytest
run: |
# sometimes the scripts hang because the channels can't be closed,
# so run under a short timeout
timeout 60s pytest -v --cov-report=term-missing --cov=varys
- name: "Upload Logfile"
uses: actions/upload-artifact@v3
with:
name: varys-logfile-${{ matrix.python-version }}
path: tests/test.log
retention-days: 5
if-no-files-found: error
if: ${{ always() }}