-
Notifications
You must be signed in to change notification settings - Fork 12
46 lines (43 loc) · 1.2 KB
/
gating.yaml
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
---
name: Pull request pre-check build & test
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
name: Run the pre-commit hook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: pre-commit/[email protected]
build-container:
name: Build and test the ipa-tuura container
runs-on: ubuntu-latest
if: github.repository_owner == 'freeipa'
needs: [pre-commit]
steps:
- uses: actions/checkout@v3
- name: build image
id: build-image
run: |
sudo -E su
podman build -t ipatuura -f Containerfile .
- name: Deploy the service
run: |
sudo -E su
podman run -d --privileged \
-p 8000:8000 -p 3501:3500 -p 4701:81 -p 4430:443 \
--hostname bridge.ipa.test \
--name bridge \
ipatuura
- name: Run the unit tests
run: |
sudo -E su
podman exec -it bridge sh -c "pip install coverage factory_boy &&
coverage run manage.py test domains -v 2 &&
coverage report &&
coverage html"