Skip to content

Commit

Permalink
moved env variables to encrypted .env.ci file, hopefully tests can no…
Browse files Browse the repository at this point in the history
…w access env variables
  • Loading branch information
Veeti Laine committed Jul 26, 2024
1 parent a358aab commit 0972744
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .env.ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#/-------------------[DOTENV_PUBLIC_KEY]--------------------/
#/ public-key encryption for .env files /
#/ [how it works](https://dotenvx.com/encryption) /
#/----------------------------------------------------------/
DOTENV_PUBLIC_KEY_CI="0269b6d4328ebeb8f69a6b84f3c3f14ef6add5844eda2f6ac8676ea31362ed1709"

# .env.ci
TEST_MONGODB_URI="encrypted:BAcJdC5MbFLLn/TIDcERs3zOOmoZj9JV4CsAmsYrxoihhn21GcP556J4g5Z8w32waOX5O3gyy1Iziw/KClIa03DXjK/YhH0JLgL4isy2QDBqO/A42CNBcCZOPuK/7ZaDFj4UlGhhZ6y/WRHIsDUpdt3Iiqnv7HrngxnXdIu5ezdRh2fgQpRG31hitVT7PjwIK1RAV4T2Q0Oa4GxtdGDqrWydm5ioevhswpM3PpH34fXLi3SDsJIaNGb/EyIuAh+ckuYDJNlunaOe07sSkCl+Vz07vUQIs8RMi9MlnWjhgPLZ//zi9QUe"
SECRET="encrypted:BDxTEqQlCj0mYJWgVa2OigtNXJEKlN9p6wl8qS8T8pV7Y1oAOtjOdvAVRZzfED3c79urJHmzz7XEjH4pH7aGhdtVhGNvR8uxhtlfCHkAwUzhgFuY9jAHvYYuLRsGtGLaYlfodWinrFIK0myH1t5r2Ug/gms="
10 changes: 5 additions & 5 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ on:
env:
COMMIT_MESSAGES: ${{ toJson(github.event.commits.*.message) }}
COMMIT: ${{ toJson(github.event.commits)[0] }}
SECRET: ${{ secrets.SECRET }}
MONGODB_URI: ${{ secrets.MONGODB_URI }}
TEST_MONGODB_URI: ${{ secrets.TEST_MONGODB_URI }}
DEV_MONGODB_URI: ${{ secrets.DEV_MONGODB_URI }}

jobs:
simple_deployment_pipeline:
Expand All @@ -28,7 +24,11 @@ jobs:
- run: npm install && cd frontend && npm install
- run: npm run eslint && cd frontend && npm run eslint
- run: npm run build
- run: npm run test
- run: curl -sfS https://dotenvx.sh/install.sh | sh
- name: backend tests
run: dotenvx run -- npm run test
env:
DOTENV_PRIVATE_KEY_CI: ${{ secrets.DOTENV_PRIVATE_KEY_CI }}
- name: frontend tests
run: cd frontend && npm run test
- name: e2e tests
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
build/
.env
.env
.env.keys

0 comments on commit 0972744

Please sign in to comment.