-
Notifications
You must be signed in to change notification settings - Fork 1
/
yaml_notes.txt
53 lines (41 loc) · 1.41 KB
/
yaml_notes.txt
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
# NOTES for main.yml exercise
name: Django Tutorials App Pipeline
# set up how the workflow is triggered
on:
# trigger workflow on push or pull requests on the main branch
push:
branches:
- main
pull_request:
branches:
- main
# allow triggering this workflow manually from the Actions tab
workflow_dispatch:
# set up the job for this workflow
jobs:
# workflow contains single job that we call "build-and-test"
build-and-test:
# runner environment
runs-on: ubuntu-latest
# CLI cmds ("run") and actions ("uses"), each step begins with hyphen -
steps:
# checks-out repository under $GITHUB_WORKSPACE, to access it
- uses: actions/checkout@v2
# run single echo cmd in runners shell
- run: echo Entering my first Django CI/CD Pipeline!
# uses action setup-python@v2, to install python version 3.9 in runner env
- name: Set Up Python 3.9
- uses: actions/setup-python@v2
with:
python-version: 3.9
# installing dependencies in ubuntu runner environment
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
# runs database migrations on Django app
- name: Run migrations
run: python manage.py migrate
# runs all tests with verbose flag
- name: Run all tests
run: pytest -v