Skip to content

Commit

Permalink
ci: Minor job improvements (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
calvincestari authored Nov 19, 2024
1 parent 3a2fb98 commit 743821e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 69 deletions.
68 changes: 1 addition & 67 deletions .github/workflows/ci-tests-xcode-swift-6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,6 @@ jobs:
./Derived/*
key: ${{ github.run_id }}-dependencies
fail-on-cache-miss: true
# Caching for apollo-ios and apollo-ios-codegen SPM dependencies
# - uses: actions/cache@v3
# with:
# path: ./DerivedData/SourcePackages
# key: ${{ runner.os }}-spm-${{ hashFiles('./apollo-ios/Package.resolved') }}-${{ hashFiles('./apollo-ios-codegen/Package.resolved') }}
# - name: Run Tuist Generation
# uses: tuist/[email protected]
# with:
# command: 'generate'
# arguments: ''
- name: Build and Test
if: ${{ matrix.should-run == true || matrix.should-run == 'true' }}
id: build-and-test
Expand Down Expand Up @@ -188,60 +178,4 @@ jobs:
path: |
TestResults/ResultBundle.zip
# CodegenTestConfigurations removed because source is not compatible with Sendable yet.

verify-frontend-bundle-latest:
runs-on: macos-15
needs: [changes]
if: ${{ needs.changes.outputs.codegen == 'true' }}
timeout-minutes: 5
name: Verify Frontend Bundle Latest - macOS
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Build JS Bundle
shell: bash
working-directory: apollo-ios-codegen/Sources/GraphQLCompiler/JavaScript
run: npm install && ./auto_rollup.sh
- name: Verify Latest
shell: bash
run: |
git diff --exit-code
verify-cli-binary-archive:
runs-on: macos-15
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-15
timeout-minutes: 20
name: Cocoapods Integration Tests - macOS
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Checkout Repo
uses: actions/checkout@v3
- name: Export ENV Variables
shell: bash
working-directory: apollo-ios
run: |
apollo_ios_sha=$(git rev-parse HEAD)
echo "APOLLO_IOS_SHA=$apollo_ios_sha" >> ${GITHUB_ENV}
- name: Run CocoaPods Integration Tests
id: run-cocoapods-integration-tests
uses: ./.github/actions/run-cocoapods-integration-tests
# CodegenTestConfigurations removed because source is not compatible with Sendable yet.
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ jobs:
- name: Build JS Bundle
shell: bash
working-directory: apollo-ios-codegen/Sources/GraphQLCompiler/JavaScript
run: npm install && ./auto_rollup.sh
run: ./auto_rollup.sh
- name: Verify Latest
shell: bash
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
output_file="$SCRIPT_DIR/../ApolloCodegenFrontendBundle.swift"
cd "$SCRIPT_DIR" && npm run build
cd "$SCRIPT_DIR" && npm install && npm run build
minJS=$(cat "$SCRIPT_DIR/dist/ApolloCodegenFrontend.bundle.js")
printf "%s%s%s" "let ApolloCodegenFrontendBundle: String = #\"" "$minJS" "\"#" > "$output_file"
exit 0

0 comments on commit 743821e

Please sign in to comment.