Skip to content

Commit

Permalink
Merge pull request #25651 from Expensify/Rory-RevertSetupNodeMapbox
Browse files Browse the repository at this point in the history
[No QA] Configure MapBox separately from node

(cherry picked from commit 4d3edb9)
  • Loading branch information
roryabraham authored and OSBotify committed Aug 22, 2023
1 parent 2d40a48 commit 6cb719d
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 58 deletions.
5 changes: 0 additions & 5 deletions .github/actions/composite/buildAndroidAPK/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@ inputs:
ARTIFACT_NAME:
description: The name of the workflow artifact where the APK should be uploaded
required: true
MAPBOX_SDK_DOWNLOAD_TOKEN:
description: Download token for the closed-source MapBox SDK.
required: true

runs:
using: composite
steps:
- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ inputs.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
with:
Expand Down
9 changes: 0 additions & 9 deletions .github/actions/composite/setupNode/action.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: Set up Node
description: Set up Node

inputs:
MAPBOX_SDK_DOWNLOAD_TOKEN:
description: Download token for the closed-source MapBox SDK.
required: true

runs:
using: composite
steps:
Expand All @@ -29,10 +24,6 @@ runs:
path: desktop/node_modules
key: ${{ runner.os }}-desktop-node-modules-${{ hashFiles('desktop/package-lock.json') }}

- name: Configure MapBox credentials to install closed-source SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ inputs.MAPBOX_SDK_DOWNLOAD_TOKEN }}
shell: bash

- name: Install root project node packages
if: steps.cache-node-modules.outputs.cache-hit != 'true'
uses: nick-fields/retry@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ In order to bundle actions with their dependencies into a single Node.js executa
Do not try to use a relative path.
- Confusingly, paths in action metadata files (`action.yml`) _must_ use relative paths.
- You can't use any dynamic values or environment variables in a `uses` statement
- In general, it is a best practice to minimize any side-effects of each action. Using atomic ("dumb") actions that have a clear and simple purpose will promote reuse and make it easier to understand the workflows that use them.
- In general, it is a best practice to minimize any side-effects of each action. Using atomic ("dumb") actions that have a clear and simple purpose will promote reuse and make it easier to understand the workflows that use them.
2 changes: 0 additions & 2 deletions .github/workflows/deployExpensifyHelp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ jobs:

- name: Setup NodeJS
uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Setup Pages
uses: actions/configure-pages@f156874f8191504dae5b037505266ed5dda6c382
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ jobs:
git fetch origin tag ${{ steps.getMostRecentRelease.outputs.VERSION }} --no-tags --depth=1
git switch --detach ${{ steps.getMostRecentRelease.outputs.VERSION }}
- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Build APK
if: ${{ !fromJSON(steps.checkForExistingArtifact.outputs.exists) }}
uses: Expensify/App/.github/actions/composite/buildAndroidAPK@main
with:
ARTIFACT_NAME: baseline-apk-${{ steps.getMostRecentRelease.outputs.VERSION }}
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

buildDelta:
runs-on: ubuntu-latest-xl
Expand Down Expand Up @@ -113,11 +115,13 @@ jobs:
- name: Checkout "delta ref"
run: git checkout ${{ steps.getDeltaRef.outputs.DELTA_REF }}

- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Build APK
uses: Expensify/App/.github/actions/composite/buildAndroidAPK@main
with:
ARTIFACT_NAME: delta-apk-${{ steps.getDeltaRef.outputs.DELTA_REF }}
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

runTestsInAWS:
runs-on: ubuntu-latest
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Lint JavaScript with ESLint
run: npm run lint
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
with:
Expand Down Expand Up @@ -110,8 +111,6 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Decrypt Developer ID Certificate
run: cd desktop && gpg --quiet --batch --yes --decrypt --passphrase="$DEVELOPER_ID_SECRET_PASSPHRASE" --output developer_id.p12 developer_id.p12.gpg
Expand Down Expand Up @@ -148,9 +147,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
with:
Expand Down Expand Up @@ -237,8 +237,6 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Setup Cloudflare CLI
run: pip3 install cloudflare
Expand Down Expand Up @@ -366,8 +364,6 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Set version
run: echo "VERSION=$(npm run print-version --silent)" >> "$GITHUB_ENV"
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ on:
jobs:
typecheck:
uses: Expensify/App/.github/workflows/typecheck.yml@main
secrets: inherit

lint:
uses: Expensify/App/.github/workflows/lint.yml@main
secrets: inherit

test:
uses: Expensify/App/.github/workflows/test.yml@main
secrets: inherit

confirmPassingBuild:
runs-on: ubuntu-latest
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/reassurePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:

- name: Setup NodeJS
uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Run performance testing script
shell: bash
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Get number of CPU cores
id: cpu-cores
Expand All @@ -46,8 +44,6 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Storybook run
run: npm run storybook -- --smoke-test --ci
Expand All @@ -60,8 +56,6 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Test CI git logic
run: tests/unit/CIGitLogicTest.sh
14 changes: 6 additions & 8 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ jobs:
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc
- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
with:
Expand All @@ -105,6 +103,9 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Run Fastlane beta test
id: runFastlaneBetaTest
run: bundle exec fastlane android build_internal
Expand Down Expand Up @@ -141,8 +142,6 @@ jobs:
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc
- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Setup Xcode
run: sudo xcode-select -switch /Applications/Xcode_14.2.app
Expand Down Expand Up @@ -175,6 +174,9 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Configure MapBox SDK
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Run Fastlane
run: bundle exec fastlane ios build_internal
env:
Expand Down Expand Up @@ -207,8 +209,6 @@ jobs:
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc
- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Decrypt Developer ID Certificate
run: cd desktop && gpg --quiet --batch --yes --decrypt --passphrase="$DEVELOPER_ID_SECRET_PASSPHRASE" --output developer_id.p12 developer_id.p12.gpg
Expand Down Expand Up @@ -250,8 +250,6 @@ jobs:
echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc
- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Configure AWS Credentials
uses: Expensify/App/.github/actions/composite/configureAwsCredentials@main
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- name: Type check with TypeScript
run: npm run typecheck
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/validateDocsRoutes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

# Verify that no new hubs were created without adding their metadata to _routes.yml
- name: Validate Docs Routes File
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/validateGithubActions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

# Rebuild all the actions on this branch and check for a diff. Fail if there is one,
# because that would be a sign that the PR author did not rebuild the Github Actions
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/verifyPodfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,5 @@ jobs:
- uses: actions/checkout@v3

- uses: Expensify/App/.github/actions/composite/setupNode@main
with:
MAPBOX_SDK_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}

- run: ./.github/scripts/verifyPodfile.sh

0 comments on commit 6cb719d

Please sign in to comment.