This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (66 loc) · 2.15 KB
/
main.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Build
on:
pull_request:
branches:
- master
jobs:
build:
name: Install and build
runs-on: ubuntu-latest
env:
DJANGO_DEBUG_FALSE: ${{ secrets.DJANGO_DEBUG_FALSE }}
DJANGO_SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }}
MONGODB_URI: ${{ secrets.MONGODB_URI }}
DBHOST: ${{ secrets.DBHOST }}
DBNAME: ${{ secrets.DBNAME }}
DBUSER: ${{ secrets.DBUSER }}
DBUSERPASSWORD: ${{ secrets.DBUSERPASSWORD }}
SMTP_PORT: ${{ secrets.SMTP_PORT }}
WHEMAIL: ${{ secrets.WHEMAIL }}
SITENAME: ${{ secrets.SITENAME }}
SMTP_SERVER: ${{ secrets.SMTP_SERVER }}
SMTP_USER: ${{ secrets.SMTP_USER }}
SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
REMOTEBROWESRDRIVER: ${{ secrets.REMOTEBROWESRDRIVER }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
services:
selenium:
image: selenium/standalone-chrome
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: "3.7"
architecture: "x64"
- name: Cache pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: pip install -r requirements.txt
- name: Start MongoDB
uses: superchargejs/mongodb-github-action@1.1.0
with:
mongodb-version: 4.2
- name: Cache Statics
run: |
python manage.py collectstatic --noinput
python manage.py compress
python manage.py collectstatic --noinput
- name: Coverage test Urls, Forms, Models, Views
run: coverage run --source=medilov manage.py test medilov.tests
# - name: Test UI
# run: python manage.py test uitests
- name: Coveralls
run: coveralls
- name: Comment on PR
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: Check build, it is ok.