ci: fix server tests script
This commit is contained in:
39
.github/workflows/ci.yml
vendored
39
.github/workflows/ci.yml
vendored
@@ -28,26 +28,32 @@ jobs:
|
|||||||
MYSQL_ROOT_PASSWORD: root
|
MYSQL_ROOT_PASSWORD: root
|
||||||
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||||
steps:
|
steps:
|
||||||
|
- name: Clone
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: setup python
|
|
||||||
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
- name: setup node
|
|
||||||
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: '18'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: setup cache for bench
|
|
||||||
|
- name: Setup ache for bench
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/bench-cache
|
path: ~/bench-cache
|
||||||
key: ${{ runner.os }}
|
key: ${{ runner.os }}
|
||||||
- name: install bench
|
|
||||||
|
- name: Install Bench
|
||||||
run: |
|
run: |
|
||||||
pip3 install frappe-bench
|
pip3 install frappe-bench
|
||||||
which bench
|
which bench
|
||||||
- name: bench init
|
|
||||||
|
- name: Bench Init
|
||||||
run: |
|
run: |
|
||||||
if [ -d ~/bench-cache/bench.tgz ]
|
if [ -d ~/bench-cache/bench.tgz ]
|
||||||
then
|
then
|
||||||
@@ -57,25 +63,32 @@ jobs:
|
|||||||
mkdir -p ~/bench-cache
|
mkdir -p ~/bench-cache
|
||||||
(cd && tar czf ~/bench-cache/bench.tgz frappe-bench)
|
(cd && tar czf ~/bench-cache/bench.tgz frappe-bench)
|
||||||
fi
|
fi
|
||||||
- name: add lms app to bench
|
|
||||||
|
- name: Add LMS app to bench
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench get-app lms $GITHUB_WORKSPACE
|
run: bench get-app lms $GITHUB_WORKSPACE
|
||||||
- name: create bench site
|
|
||||||
|
- name: Create bench site
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench new-site --mariadb-root-password root --admin-password admin frappe.local
|
run: bench new-site --mariadb-root-password root --character-set-server utf8mb4 --collation-server utf8mb4_unicode_ci --admin-password admin frappe.local
|
||||||
- name: install lms app
|
|
||||||
|
- name: Install LMS app
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench --site frappe.local install-app lms
|
run: bench --site frappe.local install-app lms
|
||||||
- name: setup requirements
|
|
||||||
|
- name: Setup Requirements
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench setup requirements --dev
|
run: bench setup requirements --dev
|
||||||
- name: allow tests
|
|
||||||
|
- name: Allow Tests
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench --site frappe.local set-config allow_tests true
|
run: bench --site frappe.local set-config allow_tests true
|
||||||
- name: bench build
|
|
||||||
|
- name: Build
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench --site frappe.local build
|
run: bench --site frappe.local build
|
||||||
- name: run tests
|
|
||||||
|
- name: Run Tests
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench --site frappe.local run-tests --app lms
|
run: bench --site frappe.local run-tests --app lms
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user