ZekeAranyLucas is running tests for the server #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tdm-server-test | |
run-name: ${{ github.actor }} is running tests for the server | |
on: | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '14' | |
- name: Change directory | |
run: cd server | |
- name: Install dependencies | |
run: npm install | |
working-directory: server | |
- name: Set up environment variables | |
run: | | |
echo "TEST_ENV=true" >> .env | |
echo "PORT=5002" >> .env | |
echo "NODE_OPTIONS=--trace-deprecation" >> .env | |
echo "JWT_SECRET_KEY=testingSecretKey" >> .env | |
echo "CLIENT_URL=http://localhost:3001" >> .env | |
echo "SERVER_URL=http://localhost:5002" >> .env | |
echo "SENDGRID_API_KEY=SG.testAPIkey" >> .env | |
echo "[email protected]" >> .env | |
echo "EMAIL_PUBLIC_COMMENT_LA_CITY=tdm+devpubliccommentplanning@test.org" >> .env | |
echo "[email protected]" >> .env | |
echo "APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/" >> .env | |
echo "[email protected]" >> .env | |
echo "SECURITY_ADMIN_PASSWORD=Dogfood1!" >> .env | |
echo "SQL_SERVER_NAME=localhost" >> .env | |
echo "SQL_SERVER_PORT=1434" >> .env | |
echo "SQL_DATABASE_NAME=tdmtestdb" >> .env | |
echo "SQL_USER_NAME=sa" >> .env | |
echo "SQL_PASSWORD=TestPassw0rd" >> .env | |
echo "SQL_ENCRYPT=false" >> .env | |
working-directory: server | |
- name: Run tests | |
run: npm test | |
working-directory: server |