From c69f2835e132ffef5ae8773f3625973e2402fe00 Mon Sep 17 00:00:00 2001 From: Thirumalesh Aaraveti Date: Wed, 16 Oct 2024 16:37:24 +0530 Subject: [PATCH] Added the actions/setup-python --- .github/workflows/Build.yml | 14 ++++++++++++++ .github/workflows/PR.yml | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 8a9d72f6..67d572b3 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -64,8 +64,15 @@ jobs: runs-on: ubuntu-latest outputs: INSTANCE_ID: ${{ steps.terraform_instance_id.outputs.INSTANCE_ID }} + strategy: + matrix: + python-version: [ '3.12' ] steps: - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - name: Configure AWS credentials for creating EC2 instance uses: aws-actions/configure-aws-credentials@v4 with: @@ -187,8 +194,15 @@ jobs: needs: [ unittest, terraform_apply, integration ] if: success() || failure() runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ '3.12' ] steps: - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - name: Configure AWS credentials for pytest uses: aws-actions/configure-aws-credentials@v4 with: diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index a1d83597..aa876cd2 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -67,12 +67,19 @@ jobs: name: terraform_apply needs: [ approve, unittest ] runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ '3.12' ] outputs: INSTANCE_ID: ${{ steps.terraform_instance_id.outputs.INSTANCE_ID }} steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - name: Configure AWS credentials for pytest uses: aws-actions/configure-aws-credentials@v4 with: @@ -188,12 +195,19 @@ jobs: terraform_destroy: name: terraform_destroy needs: [ approve, unittest, terraform_apply, integration ] + strategy: + matrix: + python-version: [ '3.12' ] if: success() || failure() runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - name: Configure AWS credentials for pytest uses: aws-actions/configure-aws-credentials@v4 with: