From 765695761a3170089f5ff78163fdcda37bad5e21 Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Mon, 10 Jul 2023 11:44:18 -0400 Subject: [PATCH] Add github action workflow for integration tests --- .github/workflows/integration_tests.yaml | 35 +++++++++++++++++++ data/ansible/integration_tests/main.yaml | 4 +-- .../roles/install_cgrates/tasks/main.yaml | 1 - 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/integration_tests.yaml diff --git a/.github/workflows/integration_tests.yaml b/.github/workflows/integration_tests.yaml new file mode 100644 index 000000000..092c906ef --- /dev/null +++ b/.github/workflows/integration_tests.yaml @@ -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 <