Skip to content

dev-config.sh: install developer tools #64

dev-config.sh: install developer tools

dev-config.sh: install developer tools #64

Workflow file for this run

name: Shell
on:
pull_request:
branches:
- main
paths:
- "bin/**"
- "cfg/**"
env:
COMPOSER_CACHE_DIR: ~/.composer/cache
TERM: xterm-256color
jobs:
format:
name: Check format
uses: es-progress/.github/.github/workflows/beautysh.yml@main
with:
dir: bin/
linter:
name: Linting
needs: format
uses: es-progress/.github/.github/workflows/shellcheck.yml@main
with:
dir: bin/
test-ci:
name: Test CI mode
runs-on: ubuntu-20.04
needs:
- format
- linter
steps:
- name: Self checkout
uses: actions/checkout@v3
- name: Cache composer
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: composer-${{ hashFiles('composer.lock') }}
- name: Setup environment
run: ./bin/prepare.sh
- name: Install CiviCRM
run: ./bin/install.sh .
- name: Get model extension (rc-base)
uses: actions/checkout@v3
with:
repository: reflexive-communications/rc-base
path: rc-base
- name: Install extension
run: ./bin/extension.sh . rc-base
- name: Run extension unit tests
run: ./bin/tests.sh . rc-base --filter DBTest
test-dev:
name: Test Dev mode
runs-on: ubuntu-20.04
needs:
- format
- linter
steps:
- name: Self checkout
uses: actions/checkout@v3
- name: Cache composer
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: composer-${{ hashFiles('composer.lock') }}
- name: Get model extension (rc-base)
uses: actions/checkout@v3
with:
repository: reflexive-communications/rc-base
path: rc-base
- name: Set local config
run: |
cp cfg/install.cfg cfg/install.local.cfg
sed -ri \
-e 's@^(civi_db_user_name)=.*$@\1=db_admin@' \
-e 's@^(civi_db_user_pass)=.*$@\1=admin@' \
-e 's@^(civi_domain)=.*$@\1=civi.local.com@' \
cfg/install.local.cfg
- name: Setup environment
run: ./bin/prepare.sh
- name: Install CiviCRM
run: ./bin/install.sh . --sample
- name: Install extension
run: ./bin/extension.sh . rc-base
- name: Config CiviCRM
run: ./bin/dev-config.sh
- name: Init test DB
run: ./bin/init-test-DB.sh
- name: Run extension unit tests
run: ./bin/tests.sh . rc-base --filter DBTest
- name: Clear cache
run: ./bin/clear-cache.sh
- name: Reinstall CiviCRM
run: ./bin/reinstall.sh . --sample