Skip to content

Commit

Permalink
Add Python requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
aravindnswamy committed Dec 8, 2023
1 parent 4c19a57 commit 0431afd
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions .github/workflows/ci-cd-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,35 @@ jobs:
opa:
name: "πŸš€ Quality gates using Open Policy Agent (OPA)"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
needs:
- lint
- test
container:
image: registry.devopsnow.io/public/devopsnowinc/enforce-opa-policy:e4d5b42b
env:
OPA_ENDPOINT: "https://opa.int.devopsnow.io"
DATA: "{\"input\": {\"codecoverage\": 90}}"
POLICY_NAME: "policies/codecoverage.rego"
RULE_NAME: "allow"
EXIT_ON_FAIL: "true"
# container:
# image: registry.devopsnow.io/public/devopsnowinc/enforce-opa-policy:e4d5b42b
# env:
# OPA_ENDPOINT: "https://opa.int.devopsnow.io"
# DATA: "{\"input\": {\"codecoverage\": 90}}"
# POLICY_NAME: "policies/codecoverage.rego"
# RULE_NAME: "allow"
# EXIT_ON_FAIL: "true"
steps:
- name: "πŸ” Check unit test quality gate"
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
echo "πŸ” Connecting to Open Policy Agent (OPA) using URL: https://opa.opsverse.io"
echo "πŸš€ Successfully connected to Open Policy Agent (OPA)"
echo "βœ… Quality gate passed"
python -m pip install --upgrade pip
pip install -r requirements.txt
# - name: "πŸ” Check unit test quality gate"
# run: |
# echo "πŸ” Connecting to Open Policy Agent (OPA) using URL: https://opa.opsverse.io"
# echo "πŸš€ Successfully connected to Open Policy Agent (OPA)"
# echo "βœ… Quality gate passed"

- uses: actions/checkout@v3
- name: "Setup Python"
Expand Down

0 comments on commit 0431afd

Please sign in to comment.