Skip to content

Adding .env to yml for test #9

Adding .env to yml for test

Adding .env to yml for test #9

Workflow file for this run

name: Server Test
on:
push:
branches:
- main # Adjust this according to your default branch name
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
cd server
npm install
- name: Run tests
run: |
cd server
touch .env
echo "DB_URL=${{ secrets.DB_URL }}" > .env
echo "DB_SERVICE_ROLE_KEY=${{ secrets.DB_SERVICE_ROLE_KEY }}" > .env
cat .env
npm test
- name: Remove .env
run: |
cd server
cat .env
rm .env