From 353fc0544085ab8c9d9a87ed42f6b5d4a00728af Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Fri, 11 Aug 2023 11:43:35 -0400 Subject: [PATCH] Update github workflows In the integration_tests one, go is now installed using actions, therefore the ansible go installation will be skipped. --- .github/workflows/build.yaml | 13 +++++++------ .github/workflows/integration_tests.yaml | 8 ++++++-- data/ansible/integration_tests/main.yaml | 3 +-- data/ansible/roles/cgrates/tasks/main.yaml | 4 ++-- data/ansible/roles/go/defaults/main.yaml | 1 + data/ansible/roles/go/tasks/main.yaml | 15 +++++++++++---- 6 files changed, 28 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d385588d3..e61850051 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,10 +27,12 @@ jobs: # needs: check-if-duplicate-action # if: needs.check-if-duplicate-action.outputs.should_skip != 'true' runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - go: ["stable"] # could be a good idea to consider oldstable as well + + ## Currently prefer to run tests for a single static go version + # strategy: + # fail-fast: true + # matrix: + # go: ["stable"] # could be a good idea to consider oldstable as well steps: - name: Check out code @@ -39,8 +41,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{ matrix.go }} - check-latest: true + go-version: "1.21.0" - name: Go Format run: gofmt -s -w . && git diff --exit-code diff --git a/.github/workflows/integration_tests.yaml b/.github/workflows/integration_tests.yaml index 0bf29ad36..ed3c847cc 100644 --- a/.github/workflows/integration_tests.yaml +++ b/.github/workflows/integration_tests.yaml @@ -29,6 +29,11 @@ jobs: - name: Checkout code uses: actions/checkout@v3 + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version: "1.21.0" + - name: Setup Python uses: actions/setup-python@v4 with: @@ -41,11 +46,10 @@ jobs: - name: Run Ansible Playbook run: | - ansible-playbook data/ansible/integration_tests/main.yaml -i localhost, -c local -e "ansible_user=$(whoami) cgrates_dir=$GITHUB_WORKSPACE clone_repository=false" + ansible-playbook data/ansible/integration_tests/main.yaml -i localhost, -c local -e "ansible_user=$(whoami) cgrates_dir=$GITHUB_WORKSPACE clone_repository=false install_go=false" - name: Run integration tests run: | sudo su <