Skip to content

Add unit test precheck to PR's #24

Add unit test precheck to PR's

Add unit test precheck to PR's #24

Workflow file for this run

name: Unit Test
on:
pull_request:
paths:
- '**/*.py'
- '**/*.js'
- '.github/workflows/unittest.yml'
jobs:
Run-Unit-Test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Get env File
run: cp ./example.env ./.env
- name: Build and run Docker containers
run: docker-compose -f docker-compose.yml up --build --detach
# - name: Run Python tests
# run: docker-compose -f docker-compose.yml exec web python manage.py test
- name: Run JavaScript Tests
run: docker-compose -f docker-compose.yml exec -T web npm run test
- name: Stop and remove containers
run: docker-compose -f docker-compose.yml down
- name: Remove Copied Env file
run: rm ./.env