Hi,
This is my first time using the Travis CI tool or any CI/CD tool.
I am using my .travis.yml file to run some unit tests I have written which require my Mongo URI which is stored in my environment variable (.env file).
I read the documentation on how to encrypt private environment variables (travis-ci.com) and followed everything.
My tests pass locally but on the Travis CI pipeline, it is unable to access the environment variable which I have encrypted, which is my Mongo URI.
This is what my .travis.yml file looks like
language: node_js
node_js: 17.4.0
env:
global:
- secure: encrypted_token
script:
- echo '*******Build starts********'
- echo 'Installing dependencies'
- npm install
- echo 'Running tests'
- npm test
I’d appreciate some help. Thanks.