Environment Variable not accessible in my CI Test

Hi,
I am trying to run CI test for my IOS app. One of the test is to login the app. I need to access username and password through environment variables set in project settings of Circle CI.

This is what I did in my config.yml file.

ios:

      macos:

        xcode: 10.2.1

      working_directory: ~/app
steps:

- run:

          command: |

echo 'export APPIUM_USERNAME=$APPIUM_USERNAME' >> $BASH_ENV 

            echo 'export APPIUM_PASSWORD=$APPIUM_PASSWORD' >> $BASH_ENV

            source $BASH_ENV

          name: Configure Environment Variables

I am unable to use APPIUM_USERNAME & APPIUM_PASSWORD in my CI test.
It gives Reference Error: APPIUM_USERNAME is not defined.
How to access it correctly?

PS: Env variable gets set properly. I checked by printing it.