Skip to content

Commit

Permalink
Update test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
EarthlingDavey committed Dec 6, 2024
1 parent 86fcd86 commit 96988ac
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 96988ac

Please sign in to comment.