diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 910bd71..0dd9515 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,9 +13,18 @@ jobs: - name: Run tests run: | cp .env.ci .env - docker compose run --rm \ - -e JWT=${{ secrets.JWT }} \ - -e AWS_CLOUDFRONT_PRIVATE_KEY="${{ secrets.TEST_AWS_CLOUDFRONT_PRIVATE_KEY }}" \ - -e AWS_CLOUDFRONT_PUBLIC_KEY="${{ secrets.TEST_AWS_CLOUDFRONT_PUBLIC_KEY }}" \ - -e AWS_CLOUDFRONT_PUBLIC_KEYS_OBJECT=${{ secrets.TEST_AWS_CLOUDFRONT_PUBLIC_KEYS_OBJECT }} \ - spider sh -c "npm ci && npm run test" + + # Add secrets to .env + echo "JWT=$JWT" >> .env + + # These secrets are used for testing, and are not used in production + echo "AWS_CLOUDFRONT_PUBLIC_KEYS_OBJECT=$AWS_CLOUDFRONT_PUBLIC_KEYS_OBJECT" >> .env + echo "AWS_CLOUDFRONT_PRIVATE_KEY=$AWS_CLOUDFRONT_PRIVATE_KEY" >> .env + echo "AWS_CLOUDFRONT_PUBLIC_KEY=$AWS_CLOUDFRONT_PUBLIC_KEY" >> .env + + docker compose run --rm spider sh -c "npm ci && npm run test" + env: + AWS_CLOUDFRONT_PUBLIC_KEYS_OBJECT: ${{ secrets.TEST_AWS_CLOUDFRONT_PUBLIC_KEYS_OBJECT }} + AWS_CLOUDFRONT_PRIVATE_KEY: ${{ secrets.TEST_AWS_CLOUDFRONT_PRIVATE_KEY }} + AWS_CLOUDFRONT_PUBLIC_KEY: ${{ secrets.TEST_AWS_CLOUDFRONT_PUBLIC_KEY }} + JWT: ${{ secrets.JWT }} \ No newline at end of file