Skip to content

Commit 89ae9fc

Browse files
Copilotlippytm
andcommitted
Fix workflow issues: remove || true from critical commands and fix deploy matrix
Co-authored-by: lippytm <65956507+lippytm@users.noreply.github.com>
1 parent 032a983 commit 89ae9fc

2 files changed

Lines changed: 28 additions & 16 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,40 @@ jobs:
2424
runs-on: ubuntu-latest
2525
environment: ${{ github.event.inputs.environment || 'dev' }}
2626

27-
strategy:
28-
matrix:
29-
include:
30-
- environment: dev
31-
cloud_role: 'arn:aws:iam::ACCOUNT_ID:role/github-actions-dev'
32-
- environment: stage
33-
cloud_role: 'arn:aws:iam::ACCOUNT_ID:role/github-actions-stage'
34-
- environment: prod
35-
cloud_role: 'arn:aws:iam::ACCOUNT_ID:role/github-actions-prod'
36-
3727
steps:
3828
- name: Checkout code
3929
uses: actions/checkout@v4
4030

31+
- name: Set cloud role based on environment
32+
id: set-role
33+
run: |
34+
ENV="${{ github.event.inputs.environment || 'dev' }}"
35+
case "$ENV" in
36+
dev)
37+
echo "cloud_role=arn:aws:iam::ACCOUNT_ID:role/github-actions-dev" >> $GITHUB_OUTPUT
38+
;;
39+
stage)
40+
echo "cloud_role=arn:aws:iam::ACCOUNT_ID:role/github-actions-stage" >> $GITHUB_OUTPUT
41+
;;
42+
prod)
43+
echo "cloud_role=arn:aws:iam::ACCOUNT_ID:role/github-actions-prod" >> $GITHUB_OUTPUT
44+
;;
45+
*)
46+
echo "cloud_role=arn:aws:iam::ACCOUNT_ID:role/github-actions-dev" >> $GITHUB_OUTPUT
47+
;;
48+
esac
49+
4150
- name: Configure AWS credentials (OIDC)
4251
# Placeholder for AWS OIDC authentication
4352
# Uncomment and configure when AWS is set up
4453
# uses: aws-actions/configure-aws-credentials@v4
4554
# with:
46-
# role-to-assume: ${{ matrix.cloud_role }}
55+
# role-to-assume: ${{ steps.set-role.outputs.cloud_role }}
4756
# aws-region: us-east-1
4857
run: |
4958
echo "OIDC authentication placeholder"
5059
echo "Environment: ${{ github.event.inputs.environment || 'dev' }}"
60+
echo "Cloud role: ${{ steps.set-role.outputs.cloud_role }}"
5161
5262
- name: Configure GCP credentials (OIDC)
5363
# Placeholder for GCP OIDC authentication

.github/workflows/lint-test.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,23 +101,25 @@ jobs:
101101
if [ -f requirements-dev.txt ]; then
102102
pip install -r requirements-dev.txt
103103
fi
104-
pip install flake8 black pytest || true
104+
# Install linting and testing tools if not already installed
105+
pip install flake8 black pytest 2>/dev/null || echo "Some tools already installed"
105106
106107
- name: Lint with flake8
107108
run: |
108109
# Stop the build if there are Python syntax errors or undefined names
109-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics || true
110+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
110111
# Exit-zero treats all errors as warnings
111-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics || true
112+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
112113
113114
- name: Check formatting with black
114115
run: |
115-
black --check . || true
116+
black --check .
117+
continue-on-error: true
116118

117119
- name: Run tests with pytest
118120
run: |
119121
if [ -d "tests" ] || find . -name "test_*.py" | grep -q .; then
120-
pytest || true
122+
pytest
121123
else
122124
echo "No tests found, skipping..."
123125
fi

0 commit comments

Comments
 (0)