mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-22 07:38:45 +05:00
Add github action workflow for integration tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
43dd9e0bdd
commit
765695761a
35
.github/workflows/integration_tests.yaml
vendored
Normal file
35
.github/workflows/integration_tests.yaml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Integration Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ v0.10 ]
|
||||
pull_request:
|
||||
branches: [ v0.10 ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install Ansible
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install ansible
|
||||
|
||||
- name: Run Ansible Playbook
|
||||
run: |
|
||||
ansible-playbook data/ansible/integration_tests/main.yaml -i localhost, -c local -e "ansible_user=$(whoami)"
|
||||
|
||||
- name: Run integration tests
|
||||
run: |
|
||||
sudo su <<EOF
|
||||
source /etc/profile
|
||||
./integration_test.sh
|
||||
EOF
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- hosts: local
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Install RabbitMQ
|
||||
import_role:
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
- name: Install Kafka
|
||||
import_role:
|
||||
name: ../roles/install_kafka
|
||||
name: ../roles/kafka
|
||||
|
||||
- name: Install MongoDB
|
||||
import_role:
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
state: directory
|
||||
mode: 'u=rwx,go=rx'
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
dest: '{{ cgrates_dir }}'
|
||||
|
||||
- name: Git clone cgrates
|
||||
|
||||
Reference in New Issue
Block a user