Skip to content

Commit

Permalink
fix(e2e-test): delete environment variables from scheme.
Browse files Browse the repository at this point in the history
  • Loading branch information
s2mr committed Jun 22, 2023
1 parent 4dc6d5b commit b9220a0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '.github/**'
branches:
- main
- fix/e2e-test

jobs:
build:
Expand Down Expand Up @@ -35,8 +36,11 @@ jobs:
E2E_API_KEY: ${{ secrets.E2E_API_KEY }}
run: make build-for-testing

- name: Unit Test
run: make test-without-building
# - name: Unit Test
# run: make test-without-building

- name: E2E Test
env:
E2E_API_ENDPOINT: ${{ secrets.E2E_API_ENDPOINT }}
E2E_API_KEY: ${{ secrets.E2E_API_KEY }}
run: make e2e-without-building
15 changes: 12 additions & 3 deletions Bucketeer.xcodeproj/xcshareddata/xcschemes/Bucketeer.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,28 @@
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
buildConfiguration = "Test"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "NO">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0065C3C428C7BB76002D92A2"
BuildableName = "BucketeerTests.xctest"
BlueprintName = "BucketeerTests"
ReferencedContainer = "container:Bucketeer.xcodeproj">
</BuildableReference>
</MacroExpansion>
<EnvironmentVariables>
<EnvironmentVariable
key = "E2E_API_ENDPOINT"
value = "stub"
value = "$(E2E_API_ENDPOINT)"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "E2E_API_KEY"
value = "stub"
value = "$(E2E_API_KEY)"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ BUILD=$(XCODEBUILD) $(OPTIONS) $(DESTINATION) \
build
BUILD_FOR_TESTING=$(XCODEBUILD) $(OPTIONS) $(DESTINATION) \
-configuration Test \
build-for-testing E2E_API_ENDPOINT=$(E2E_API_ENDPOINT) E2E_API_KEY=$(E2E_API_KEY)
build-for-testing E2E_API_ENDPOINT=$(E2E_API_ENDPOINT) E2E_API_KEY=$(E2E_API_KEY) TEST_ENV=E2E_API_ENDPOINT,E2E_API_KEY
TEST_WITHOUT_BUILDING=$(XCODEBUILD) $(OPTIONS) $(DESTINATION) \
-configuration Test \
-skip-testing:BucketeerTests/BucketeerE2ETests \
test-without-building
E2E_WITHOUT_BUILDING=$(XCODEBUILD) $(OPTIONS) $(DESTINATION) \
-configuration Test \
-only-testing:BucketeerTests/BucketeerE2ETests \
test-without-building
test-without-building E2E_API_ENDPOINT=$(E2E_API_ENDPOINT) E2E_API_KEY=$(E2E_API_KEY) TEST_ENV=E2E_API_ENDPOINT,E2E_API_KEY
ALL_TEST_WITHOUT_BUILDING=$(XCODEBUILD) $(OPTIONS) $(DESTINATION) \
-configuration Test \
test-without-building
test-without-building E2E_API_ENDPOINT=$(E2E_API_ENDPOINT) E2E_API_KEY=$(E2E_API_KEY) TEST_ENV=E2E_API_ENDPOINT,E2E_API_KEY
BUILD_EXAMPLE=$(XCODEBUILD) $(EXAMPLE_OPTIONS) $(DESTINATION) \
-configuration $(CONFIGURATION) \
build API_ENDPOINT=$(API_ENDPOINT) API_KEY=$(API_KEY)
Expand Down

0 comments on commit b9220a0

Please sign in to comment.