-
Notifications
You must be signed in to change notification settings - Fork 26
38 lines (34 loc) · 923 Bytes
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Unit and E2E Tests
on:
push:
branches:
- master
- testing
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Jest
run: npm install jest
- name: Run unit tests (Jest)
run: npm run jest
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run migrations
run: python manage.py migrate
- name: Start Django server
run: python manage.py runserver &
env:
DJANGO_WEATHER_API_KEY: ${{ secrets.DJANGO_WEATHER_API_KEY }}
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Run E2E Tests (Cypress)
uses: cypress-io/github-action@v2