-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a Vagrantfile to run the test suite.
vagrant up vagrant ssh python runtests.py
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure(2) do |config| | ||
config.vm.synced_folder ".", "/vagrant" | ||
config.vm.define "tokenapi", primary: true do |tokenapi| | ||
tokenapi.vm.box = "bento/debian-11.7" | ||
tokenapi.vm.hostname = "tokenapi" | ||
|
||
tokenapi.vm.provider "virtualbox" do |vb| | ||
vb.memory = "2048" | ||
end | ||
|
||
tokenapi.vm.provision "shell", inline: <<-SHELL | ||
apt-get update | ||
DEBIAN_FRONTEND="noninteractive" apt-get install -y build-essential python3-venv | ||
SHELL | ||
|
||
tokenapi.vm.provision "create-virtualenv-py3", type: :shell, privileged: false, inline: <<-SHELL | ||
cd ~ | ||
python3 -m venv venv_py3 | ||
SHELL | ||
|
||
tokenapi.vm.provision "pip3-install", type: :shell, privileged: false, inline: <<-SHELL | ||
source ~/venv_py3/bin/activate | ||
pip3 install django==4.0.10 six | ||
SHELL | ||
|
||
tokenapi.vm.provision "bashrc", type: :shell, privileged: false, inline: <<-SHELL | ||
echo "cd /vagrant" >> ~/.bashrc | ||
echo "source ~/venv_py3/bin/activate" >> ~/.bashrc | ||
SHELL | ||
end | ||
end | ||
|