Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/circumference-test-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@ jobs:
sudo apt install -y podman
podman --version

- name: Clone circumference and start PINPing
- name: Start PINPing
id: run_tests
run: |
git clone https://github.com/underground-software/circumference ../circumference
cd ../circumference
podman build --build-context=singularity_git_repo=$OLDPWD -t singularity-test .
podman build --build-context=singularity_git_repo=. -t singularity-test .
podman run --rm --privileged localhost/singularity-test:latest

- name: Report test results
Expand Down
25 changes: 25 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM fedora:latest

RUN dnf update -y && \
dnf install -y \
podman \
podman-compose \
jq \
ShellCheck \
which \
python-flake8 \
python-virtualenv \
python-pip \
git

RUN sed -i 's/log_driver = "journald"/log_driver = "json-file"/' /usr/share/containers/containers.conf

COPY --from=singularity_git_repo . ./singularity

RUN mkdir -p singularity/{repos,docs}

COPY start.sh .

WORKDIR singularity

ENTRYPOINT ["/start.sh"]
19 changes: 19 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

set -ex

mkdir -p /var/lib/containers/storage
mount -t tmpfs tmpfs /var/lib/containers/storage
podman-compose build
podman-compose up -d
# wait until synapse is done initializing
podman-compose logs -f submatrix 2>&1 | sed '/Synapse now listening on TCP port 8008/ q'
if [ -f test.sh ]
then
./test.sh
else
virtualenv .
pip install -r requirements.txt
pytest
fi
podman-compose down