-
Notifications
You must be signed in to change notification settings - Fork 50
102 lines (94 loc) · 2.58 KB
/
dab-consumers.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
name: Testing DAB Consumers
on:
push:
pull_request:
jobs:
awx:
name: AWX
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Pull AWX devel image
run: docker pull ghcr.io/ansible/awx_devel:devel
# Generate a docker image that includes current DAB
- name: Create image for AWX devel that includes our DAB
run: |
mkdir awx-dockerfile
cat <<EOF > awx-dockerfile/Dockerfile
FROM ghcr.io/ansible/awx_devel:devel
COPY . /opt/dab/
RUN pip install -e /opt/dab/
EOF
docker build -t awx-with-dab:latest -f awx-dockerfile/Dockerfile .
- uses: actions/checkout@v4
with:
repository: ansible/awx
path: awx
- name: Run AWX tests in the generated image
run: |
cd awx
DEVEL_IMAGE_NAME=awx-with-dab:latest AWX_DOCKER_CMD=/start_tests.sh make docker-runner
eda-server:
name: eda-server
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
strategy:
fail-fast: false
env:
EDA_SECRET_KEY: 'test'
EDA_DB_PASSWORD: 'secret'
services:
postgres:
image: 'quay.io/sclorg/postgresql-15-c9s:latest'
env:
POSTGRESQL_USER: eda
POSTGRESQL_PASSWORD: secret
POSTGRESQL_ADMIN_PASSWORD: secret
POSTGRESQL_DATABASE: eda
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- '5432:5432'
redis:
image: 'quay.io/fedora/redis-6:latest'
ports:
- '6379:6379'
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: actions/checkout@v4
with:
repository: ansible/eda-server
path: eda-server
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Run eda-server tests
run: |
DAB_PATH="$PWD"
mv eda-server /tmp
cd /tmp/eda-server
pipx install poetry
poetry install -E all --only main,test
poetry run pip install -e "$DAB_PATH"
poetry run pip show django-ansible-base
poetry run pytest