Browse Source

Issue 4577 - Add GitHub actions

Description:

* Enable IPv6 support for docker daemon
* Set server.example.com as FQDN for container

Relates: https://github.com/389ds/389-ds-base/issues/4577

Reviewed by: @droideck (Thanks!)
Viktor Ashirov 4 years ago
parent
commit
3e09bff1e3
2 changed files with 8 additions and 1 deletions
  1. 5 0
      .github/daemon.json
  2. 3 1
      .github/workflows/pytest.yml

+ 5 - 0
.github/daemon.json

@@ -0,0 +1,5 @@
+{
+    "ipv6": true,
+    "fixed-cidr-v6": "2001:db8:1::/64"
+}
+

+ 3 - 1
.github/workflows/pytest.yml

@@ -47,6 +47,8 @@ jobs:
         sudo apt update -y
         sudo apt install -y docker.io containerd runc
 
+        sudo cp .github/daemon.json /etc/docker/daemon.json
+
         sudo systemctl unmask docker
         sudo systemctl start docker
 
@@ -61,7 +63,7 @@ jobs:
     - name: Run pytest in a container
       run: |
         set -x
-        CID=$(sudo docker run -d --privileged --rm -v /sys/fs/cgroup:/sys/fs/cgroup:rw,rslave -v ${PWD}:/workspace quay.io/389ds/ci-images:test)
+        CID=$(sudo docker run -d -h server.example.com --privileged --rm -v /sys/fs/cgroup:/sys/fs/cgroup:rw,rslave -v ${PWD}:/workspace quay.io/389ds/ci-images:test)
         sudo docker exec $CID sh -c "dnf install -y -v dist/rpms/*rpm"
         sudo docker exec $CID py.test --junit-xml=pytest.xml -v dirsrvtests/tests/suites/${{ matrix.suite }}