Skip to content
Snippets Groups Projects
Verified Commit afe7c9e5 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Virtual env

parent dbdeeb91
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ driver: ...@@ -6,7 +6,7 @@ driver:
lint: lint:
name: yamllint name: yamllint
platforms: platforms:
- name: instance - name: debian-stretch
image: alehaa/debian-systemd:stretch image: alehaa/debian-systemd:stretch
command: /sbin/init command: /sbin/init
tmpfs: tmpfs:
...@@ -19,6 +19,7 @@ provisioner: ...@@ -19,6 +19,7 @@ provisioner:
name: ansible name: ansible
lint: lint:
name: ansible-lint name: ansible-lint
verifier: verifier:
name: testinfra name: testinfra
lint: lint:
......
...@@ -97,3 +97,14 @@ def test_api_download(host): ...@@ -97,3 +97,14 @@ def test_api_download(host):
assert f.exists is True assert f.exists is True
assert f.contains('__version__ = "0.19.0-rc2"') is True assert f.contains('__version__ = "0.19.0-rc2"') is True
def test_virtualenv(host):
expected_packages = {"Django", "djangorestframework", "celery"}
packages = host.pip_package.get_packages(
pip_path="/srv/funkwhale/virtualenv/bin/pip"
)
names = set(packages.keys())
intersection = expected_packages & names
assert intersection == expected_packages
--- ---
- name: "Create funkwhale user" - name: "Create funkwhale user"
user: user:
name: "{{ funkwhale_username }}" name: "{{ funkwhale_username }}"
...@@ -48,3 +46,16 @@ ...@@ -48,3 +46,16 @@
src: https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/{{ funkwhale_version }}/download?job=build_api src: https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/{{ funkwhale_version }}/download?job=build_api
dest: "{{ funkwhale_install_path }}" dest: "{{ funkwhale_install_path }}"
remote_src: true remote_src: true
- name: "Setup virtualenv"
pip:
name: wheel
virtualenv: "{{ funkwhale_install_path }}/virtualenv"
virtualenv_python: python3
- name: "Install python dependencies"
pip:
requirements: "{{ funkwhale_install_path }}/api/requirements.txt"
virtualenv: "{{ funkwhale_install_path }}/virtualenv"
virtualenv_python: python3
--- ---
# - include: packages.yml - include: packages.yml
# - include: db.yml - include: db.yml
# - include: redis.yml - include: redis.yml
- include: funkwhale.yml - include: funkwhale.yml
- include: nginx.yml - include: nginx.yml
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
- "python3" - "python3"
- "python3-dev" - "python3-dev"
- "python3-pip" - "python3-pip"
- "python3-venv" - "python-virtualenv" # for ansible
- "python3-virtualenv"
- "libldap2-dev" - "libldap2-dev"
- "libsasl2-dev" - "libsasl2-dev"
- "git" - "git"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment