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
74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: CI

on:
push:
branches:
- unity-v3
pull_request:

concurrency:
group: excel_view-ci-${{ github.event.number || github.ref }}
cancel-in-progress: true

jobs:
tests:
runs-on: ubuntu-latest
name: Server tests

services:
redis-cache:
image: redis:alpine
ports:
- 13000:6379
redis-queue:
image: redis:alpine
ports:
- 11000:6379
mariadb:
image: mariadb:10.6
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mariadb-admin ping" --health-interval=5s --health-timeout=2s --health-retries=3

steps:
- name: Clone
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install MariaDB client
run: |
sudo apt update
sudo apt-get install -y mariadb-client

- name: Setup bench
run: |
pip install frappe-bench
bench init --skip-redis-config-generation --skip-assets --frappe-branch version-15 --python "$(which python)" ~/frappe-bench
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "SET GLOBAL character_set_server = 'utf8mb4'"
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'"

- name: Install app
working-directory: /home/runner/frappe-bench
run: |
bench get-app excel_view $GITHUB_WORKSPACE
bench new-site --db-root-password root --admin-password admin test_site
bench --site test_site install-app excel_view
env:
CI: "Yes"

- name: Run tests
working-directory: /home/runner/frappe-bench
run: |
bench --site test_site set-config allow_tests true
bench --site test_site run-tests --app excel_view
Loading
Loading