Skip to content

Commit

Permalink
New CI job to verify CLI version
Browse files Browse the repository at this point in the history
  • Loading branch information
calvincestari committed May 23, 2024
1 parent 9393caf commit 8551336
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,24 @@ jobs:
run: |
git diff --exit-code
verify-cli-binary-archive:
runs-on: macos-13
needs: [changes]
if: ${{ needs.changes.outputs.codegen == 'true' }}
timeout-minutes: 5
name: Verify CLI Binary Archive - macOS
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Extract CLI Binary
shell: bash
working-directory: apollo-ios/CLI
run: tar -xf apollo-ios-cli.tar.gz apollo-ios-cli
- name: Verify Version
shell: bash
working-directory: apollo-ios/scripts
run: ./cli-version-check.sh

run-cocoapods-integration-tests:
runs-on: macos-13
timeout-minutes: 20
Expand Down
18 changes: 18 additions & 0 deletions apollo-ios/scripts/cli-version-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

directory=$(dirname "$0")
projectDir="$directory/../CLI"

APOLLO_VERSION=$(sh "$directory/get-version.sh")
FILE_PATH="$projectDir/apollo-ios-cli.tar.gz"
tar -xf "$FILE_PATH"
CLI_VERSION=$(./apollo-ios-cli --version)

echo "Comparing Apollo version $APOLLO_VERSION with CLI version $CLI_VERSION"

if [ "$APOLLO_VERSION" = "$CLI_VERSION" ]; then
echo "Success - matched!"
else
echo "Failed - mismatch!"
exit 1
fi

0 comments on commit 8551336

Please sign in to comment.