Skip to content

Commit

Permalink
generate .env file for using docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
hyihua committed Nov 24, 2023
1 parent 676043d commit 9a76cd1
Showing 1 changed file with 12 additions and 32 deletions.
44 changes: 12 additions & 32 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,20 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v2

# - name: Build and run Docker containers
# run: docker-compose -f docker-compose.yml up --build --detach
- name: Get env File
run: cp ./example.env ./.env

# - name: Run Python tests
# run: docker-compose -f docker-compose.yml exec myapp python manage.py test
- name: Build and run Docker containers
run: docker-compose -f docker-compose.yml up --build --detach

# - name: Run JavaScript Tests
# run: docker-compose -f docker-compose.yml exec myapp npm run test
- name: Run Python tests
run: docker-compose -f docker-compose.yml exec myapp python manage.py test

# - name: Stop and remove containers
# run: docker-compose -f path/to/your/docker-compose.yml down

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10

- name: Install Python Dependencies
run: |
pip install -r requirements.txt
- name: Run Tests
run: |
python manage.py test
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Run JavaScript Tests
run: docker-compose -f docker-compose.yml exec myapp npm run test

- name: Install Node.js Dependencies
run: |
npm install
- name: Stop and remove containers
run: docker-compose -f path/to/your/docker-compose.yml down

- name: Run JavaScript Tests
run: |
npm run test
- name: Remove Copied Env file
run: rm ./.env

0 comments on commit 9a76cd1

Please sign in to comment.