-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (61 loc) · 2.31 KB
/
test.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
name: Test
on:
push:
branches:
- master
pull_request:
merge_group:
jobs:
tests:
runs-on: ubuntu-latest
container:
# Docker-in-docker is not really necessary but helps the network
# communication between the runner and the services, and also makes
# it much simpler to transition from GitLab to GitHub as we use the
# same image and dependencies / setup as before, it should probably
# be revisited in the not-so-distant future
image: quay.io/prodsecdev/fedora-latest:35
credentials:
username: ${{ secrets.QUAY_REGISTRY_USERNAME }}
password: ${{ secrets.QUAY_REGISTRY_TOKEN }}
services:
postgres:
image: registry.redhat.io/rhel8/postgresql-13:1
env:
POSTGRESQL_ADMIN_PASSWORD: test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
credentials:
username: ${{ secrets.RH_REGISTRY_USERNAME }}
password: ${{ secrets.RH_REGISTRY_TOKEN }}
testldap:
image: quay.io/prodsecdev/openldap:2.5.7-debian-10-r57
env:
LDAP_ROOT: dc=redhat,dc=com
LDAP_ADMIN_USERNAME: admin
LDAP_ADMIN_PASSWORD: adminpassword
credentials:
username: ${{ secrets.QUAY_REGISTRY_USERNAME }}
password: ${{ secrets.QUAY_REGISTRY_TOKEN }}
redis:
image: redis
steps:
- uses: actions/checkout@v4
- name: Install required packages
run: dnf install -y openldap-devel openldap-clients python3.9 postgresql-contrib
- name: Setup PostgreSQL service
run: psql -f etc/pg/local-dev-app-user.sql postgres://postgres:test@postgres:5432/
- name: Setup LDAP service
run: ldapadd -c -H "ldap://testldap:1389" -x -D "cn=admin,dc=redhat,dc=com" -w "adminpassword" -f etc/openldap/local-export.ldif || true
- name: Run OSIDB tests
env:
ET_URL: ${{ secrets.ET_URL }}
PRODUCT_DEF_URL: ${{ secrets.PRODUCT_DEF_URL }}
PS_CONSTANTS_URL: ${{ secrets.PS_CONSTANTS_URL }}
HTTPS_TASKMAN_PROXY: ${{ secrets.HTTPS_TASKMAN_PROXY }}
JIRA_TASKMAN_URL: ${{ secrets.JIRA_TASKMAN_URL }}
JIRA_TASKMAN_PROJECT_KEY: ${{ secrets.JIRA_TASKMAN_PROJECT_KEY }}
run: tox -e ci-osidb