2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-24 13:09:01 +00:00

Merge pull request #753 from sagarvora/circleci

feat(CircleCI): tests shall not fail! ✔️
This commit is contained in:
Ameya Shenoy 2018-12-12 15:31:28 +05:30 committed by GitHub
commit 36d12fe110
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 4 deletions

32
.circleci/config.yml Normal file
View File

@ -0,0 +1,32 @@
version: 2
jobs:
build:
machine: true
working_directory: ~/repo
steps:
- checkout
- run:
name: Setup
command: |
sudo pip install --ignore-installed setuptools
sudo pip install urllib3 pyOpenSSL ndg-httpsclient pyasn1
sudo cp -r ~/.ssh/* /root/.ssh
mkdir -p ~/.bench
mkdir -p /tmp/.bench
cp -r ~/repo/* ~/.bench
cp -r ~/repo/* /tmp/.bench
- run:
name: Install Bench (Production)
command: sudo python ~/repo/playbooks/install.py --user travis --run-travis --production
- run:
name: Setup Tests
command: |
cd ~
sudo pip install --upgrade pip
sudo pip install -e ~/.bench
- run:
name: Run Tests
command: sudo -E python -m unittest -v bench.tests.test_setup_production

View File

@ -4,7 +4,7 @@
<h2>Frappe Bench</h2> <h2>Frappe Bench</h2>
</div> </div>
[![Build Status](https://travis-ci.org/frappe/bench.svg?branch=master)](https://travis-ci.org/frappe/bench) [![Build Status](https://circleci.com/gh/frappe/bench.svg?style=svg)](https://circleci.com/gh/frappe/bench)
The bench is a command-line utility that helps you to install apps, manage multiple sites and update Frappe / ERPNext apps on */nix (CentOS, Debian, Ubuntu, etc) for development and production. Bench will also create nginx and supervisor config files, setup backups and much more. The bench is a command-line utility that helps you to install apps, manage multiple sites and update Frappe / ERPNext apps on */nix (CentOS, Debian, Ubuntu, etc) for development and production. Bench will also create nginx and supervisor config files, setup backups and much more.

View File

@ -78,8 +78,8 @@ class TestBenchInit(unittest.TestCase):
def new_site(self, site_name): def new_site(self, site_name):
new_site_cmd = ["bench", "new-site", site_name, "--admin-password", "admin"] new_site_cmd = ["bench", "new-site", site_name, "--admin-password", "admin"]
# set in travis # set in CI
if os.environ.get("TRAVIS"): if os.environ.get('CI'):
new_site_cmd.extend(["--mariadb-root-password", "travis"]) new_site_cmd.extend(["--mariadb-root-password", "travis"])
subprocess.check_output(new_site_cmd, cwd=os.path.join(self.benches_path, "test-bench")) subprocess.check_output(new_site_cmd, cwd=os.path.join(self.benches_path, "test-bench"))
@ -186,7 +186,7 @@ class TestBenchInit(unittest.TestCase):
if archived_sites_path: if archived_sites_path:
drop_site_cmd.extend(['--archived-sites-path', archived_sites_path]) drop_site_cmd.extend(['--archived-sites-path', archived_sites_path])
if os.environ.get('TRAVIS'): if os.environ.get('CI'):
drop_site_cmd.extend(['--root-password', 'travis']) drop_site_cmd.extend(['--root-password', 'travis'])
bench_path = os.path.join(self.benches_path, 'test-bench') bench_path = os.path.join(self.benches_path, 'test-bench')