Skip to content

Commit

Permalink
Fix scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
gchristov committed Oct 22, 2024
1 parent ae00e74 commit 45f2d8a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/deploy-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,20 @@ jobs:
uses: gradle/actions/setup-gradle@v3 # By default, cache is only saved on the 'master' branch
- name: Set up secrets
run: |
set -o pipefail &&
set -Eeuo pipefail
bash tools/scripts/secrets.sh
- name: Build service
if: ${{ matrix.service }} != 'common' # The common service only has infra
run: |
# Need to explicitly cd into each service, otherwise we get yarn cache clashes
set -o pipefail &&
cd ${{ matrix.service }} &&
./gradlew --no-daemon assemble &&
cd ..
set -Eeuo pipefail
if [ -e "${{ matrix.service }}/gradlew" ]; then
# Need to explicitly cd into each service, otherwise we get yarn cache clashes
cd ${{ matrix.service }}
./gradlew --no-daemon assemble
cd ..
else
echo "Skipping step as required file doesn't exist"
fi
- name: Deploy infrastructure
uses: pulumi/actions@v5
with:
Expand Down Expand Up @@ -121,16 +125,20 @@ jobs:
uses: gradle/actions/setup-gradle@v3 # By default, cache is only saved on the 'master' branch
- name: Set up secrets
run: |
set -o pipefail &&
set -Eeuo pipefail
bash tools/scripts/secrets.sh
- name: Test
if: ${{ matrix.service }} != 'common' # The common service only has infra
run: |
# Need to explicitly cd into each service, otherwise we get yarn cache clashes
set -o pipefail &&
cd ${{ matrix.service }} &&
./gradlew --no-daemon --continue jsTest &&
cd ..
set -Eeuo pipefail
if [ -e "${{ matrix.service }}/gradlew" ]; then
# Need to explicitly cd into each service, otherwise we get yarn cache clashes
cd ${{ matrix.service }}
./gradlew --no-daemon --continue jsTest
cd ..
else
echo "Skipping step as required file doesn't exist"
fi
- name: Generate test report
uses: mikepenz/action-junit-report@v4
if: always() # Ensure all test reports are collected, even after errors
Expand Down
2 changes: 1 addition & 1 deletion tools/scripts/list_services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
# Should be invoked from the root of the project as all paths are relative.

all_services=($(find . -maxdepth 2 -type d -name infra -exec test -f "{}/Pulumi.yaml" \; -print | awk -F'/' '{print $2}' | xargs -I {} echo {}))
jhqekj][pq]

if [ ${#all_services[@]} -eq 0 ]; then
echo "No services detected"
exit 1
Expand Down

0 comments on commit 45f2d8a

Please sign in to comment.