SlideShare a Scribd company logo
1 of 29
Continuous Integration (CI), Continuous Delivery (CD),
Continuous Deployment, CI/CD Pipelines, GitHub Actions
Building a CI/CD System with GitHub Actions
1
Software University
https://softuni.bg
Svetlin Nakov, PhD
Co-Founder and Innovations
Manager @ SoftUni
https://nakov.com
2
 Software engineer, tech trainer, entrepreneur
author of 16 books
nakov.com
 4 successful tech education initiatives
 National Academy for Software
Development (NASD)
 Telerik Software Academy
 SoftUni (Software University)
 Private IT High School "SoftUni Svetlina"
About Svetlin Nakov
3
 Intro to Continuous Integration (CI),
Continuous Delivery (CD),
Continuous Deployment (CD),
and CI/CD Pipelines
 Intro to GitHub Actions
 Building CI workflow
 Building CD workflow
 Live Demo: Build CI System for JS and .NET Apps
Contents
The CI/CD Pipeline
Continuous Integration / Delivery
 CI/CD pipeline
 Continuously integrate
and release new features
 Continuous integration (CI)
 Write code, test and integrate it in the product
 Continuous delivery (CD)
 Continuously release new features
 QAs maintain and monitor the CI/CD pipeline
CI/CD Pipeline
5
 Continuous integration (CI)
 Integrating the code from different developers frequently
(several times a day)
 Automated building, and testing the software
 Typically, after each Git push in the main branch
 Allows finding integration problems and bugs early
 Continuously maintain software quality
Continuous Integration (CI)
 Continuous delivery (CD)
 Keeping your codebase deployable at any point
 CD continuously verifies that
 Software builds correctly
 Passes automated tests
 Has all the necessary configuration and assets for
deployment in production
Continuous Delivery (CD)
 Continuous deployment (CD)
 Continuous automated deployment of the software
 E.g. after each git push
 Deployment is typically done to a testing environment
 Example: https://dev.myproduct.com
 Sometimes directly to the production servers
Continuous Deployment (CD)
 CI/CD pipeline == CI + CD
 Continuously integrate, test
and release new features
 On git push, the CI/CD pipeline does automatically:
 Build the software (compile, package, sign, etc.)
 Run the automated tests (unit, integration)
 Deploy on the testing environment + run E2E tests
 Or only prepare for deployment
 Or deploy directly on production
CI/CD Pipeline
Introduction
GitHub Actions
 GitHub Actions
 Cloud-based software workflow automation
environment (CI/CD on the GitHub cloud)
 Allows creating CI/CD pipelines to build, test and
deploy software projects, directly from a GitHub repo
 https://github.com/features/actions
 Free for public repos + 2000 mins per month
for private repos with the free plan
GitHub Actions
11
 Events execute workflows
(one or several jobs, running in parallel)
 Workflows hold jobs
(e. g. build, check security, deploy)
 Jobs hold steps (e. g. "checkout the
code", "install .NET", "run tests", …)
 Steps hold actions
(commands like `dotnet test`)
GitHub Actions: Concepts
event
workflow
job
job
step 1
action 1
action 2
step 2
action
12
CI Workflow in GitHub Actions
Building a CI System for Existing JS App
13
 We have a JS App (with integration tests):
 Code: https://github.com/nakov/MVC-app-integration-tests-example-mocha
 Live: https://nakov-mvc-node-app.herokuapp.com
Sample JS App: Students Registry
14
 Clone the app repo
 Restore the Node packages:
 Run the Mocha integration tests
Build and Run Locally (by Hand)
git clone https://github.com/nakov/MVC-app-integration-
tests-example-mocha
npm install
npm test
15
 Let's implement a CI/CD
pipeline in GitHub Actions
 Build & test workflow
 Runs on push
 Deploy workflow
 Runs manually
CI/CD Pipeline in GitHub Actions
16
name: Build and Test
on: [push]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm ci
- run: npm test
GitHub Actions: Build & Test Workflow
mocha-tests.yml
Auto run on each "push"
Install Node.js
Install dependencies and build the app
Run the automated tests
Clone the repo
17
name: Deploy to Heroku
on: [workflow_dispatch]
jobs:
deploy-to-heroku:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.6.8
with:
heroku_app_name: "some-app-name"
heroku_email: ${{secrets.HEROKU_EMAIL}}
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
GitHub Actions: Manual Deploy Workflow
deploy.yml
Run the workflow
manually
Clone the repo
Deploy in
Heroku
18
 GitHub Project  Settings  Secrets
Security Warning: Use Repository Secrets!
19
Live Demo
CI Workflow for JS App
in GitHub Actions
https://github.com/nakov/MVC-app-
integration-tests-example-mocha/actions
20
.NET MVC App + REST API + Desktop App + Android App
CI System for More Complex System
21
 We have a .NET Web app (with tests):
Continuous Integration for .NET Apps
 Code: https://github.com/nakov/Eventures
22
GitHub Actions: Build & Test Workflow
name: Build and Test
on: [push]
jobs:
WebApp-tests:
# Buld and run tests for the Eventures Web App …
WebApi-tests:
# Buld and run tests for the Eventures Web API …
DesktopApp-tests:
# Buld and run tests for the Eventures Desktop App …
AndroidApp-tests:
# Buld and run tests for the Eventures Android App …
dotnet-build.yml
23
GitHub Actions: Web App Tests Job
24
GitHub Actions: Web API Tests Job
25
GitHub Actions: Desktop App Tests Job
26
GitHub Actions: Android App Tests Job
27
Live Demo
CI Workflow for .NET
App in GitHub Actions
https://github.com/nakov/Eventures/blob/main/
.github/workflows/dotnet-build.yml
28
SoftUni – https://softuni.bg

More Related Content

What's hot

Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes waysparkfabrik
 
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionAnwarul Islam
 
DevOps with GitHub Actions
DevOps with GitHub ActionsDevOps with GitHub Actions
DevOps with GitHub ActionsNilesh Gule
 
GitHub Actions with Node.js
GitHub Actions with Node.jsGitHub Actions with Node.js
GitHub Actions with Node.jsStefan Stölzle
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.skJuraj Hantak
 
Introduction to Github Actions
Introduction to Github ActionsIntroduction to Github Actions
Introduction to Github ActionsKnoldus Inc.
 
CI with Gitlab & Docker
CI with Gitlab & DockerCI with Gitlab & Docker
CI with Gitlab & DockerJoerg Henning
 
Git and GitHub for Documentation
Git and GitHub for DocumentationGit and GitHub for Documentation
Git and GitHub for DocumentationAnne Gentle
 
Comparing Next-Generation Container Image Building Tools
 Comparing Next-Generation Container Image Building Tools Comparing Next-Generation Container Image Building Tools
Comparing Next-Generation Container Image Building ToolsAkihiro Suda
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIDavid Hahn
 
Gitlab flow solo
Gitlab flow soloGitlab flow solo
Gitlab flow soloviniciusban
 
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요Jo Hoon
 
The journey to GitOps
The journey to GitOpsThe journey to GitOps
The journey to GitOpsNicola Baldi
 

What's hot (20)

Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes way
 
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training Session
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
DevOps with GitHub Actions
DevOps with GitHub ActionsDevOps with GitHub Actions
DevOps with GitHub Actions
 
CI/CD with Github Actions
CI/CD with Github ActionsCI/CD with Github Actions
CI/CD with Github Actions
 
GitHub Actions with Node.js
GitHub Actions with Node.jsGitHub Actions with Node.js
GitHub Actions with Node.js
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.sk
 
Introduction to Github Actions
Introduction to Github ActionsIntroduction to Github Actions
Introduction to Github Actions
 
CI with Gitlab & Docker
CI with Gitlab & DockerCI with Gitlab & Docker
CI with Gitlab & Docker
 
Git and GitHub for Documentation
Git and GitHub for DocumentationGit and GitHub for Documentation
Git and GitHub for Documentation
 
Advanced Git
Advanced GitAdvanced Git
Advanced Git
 
Comparing Next-Generation Container Image Building Tools
 Comparing Next-Generation Container Image Building Tools Comparing Next-Generation Container Image Building Tools
Comparing Next-Generation Container Image Building Tools
 
Github
GithubGithub
Github
 
Overview of github
Overview of githubOverview of github
Overview of github
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
 
CI/CD with GitHub Actions
CI/CD with GitHub ActionsCI/CD with GitHub Actions
CI/CD with GitHub Actions
 
Gitlab flow solo
Gitlab flow soloGitlab flow solo
Gitlab flow solo
 
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
 
The journey to GitOps
The journey to GitOpsThe journey to GitOps
The journey to GitOps
 
Gitlab ci-cd
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cd
 

Similar to GitHub Actions (Nakov at RuseConf, Sept 2022)

GitHub Actions for 5 minutes
GitHub Actions for 5 minutesGitHub Actions for 5 minutes
GitHub Actions for 5 minutesSvetlin Nakov
 
CICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsCICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsKumar Shìvam
 
Turnkey Continuous Delivery
Turnkey Continuous DeliveryTurnkey Continuous Delivery
Turnkey Continuous DeliveryGianni Bombelli
 
Serving Pull Requests with Jenkins
Serving Pull Requests with JenkinsServing Pull Requests with Jenkins
Serving Pull Requests with JenkinsSeth Goings
 
Deploying Mule Applications with Jenkins, Azure and BitBucket (1).pptx
Deploying Mule Applications with Jenkins, Azure and BitBucket (1).pptxDeploying Mule Applications with Jenkins, Azure and BitBucket (1).pptx
Deploying Mule Applications with Jenkins, Azure and BitBucket (1).pptxPankaj Goyal
 
TMF2014 CI-CD Workshop Michael Palotas
TMF2014 CI-CD Workshop Michael PalotasTMF2014 CI-CD Workshop Michael Palotas
TMF2014 CI-CD Workshop Michael PalotasKJR
 
OpenShift Build Pipelines @ Lightweight Java User Group Meetup
OpenShift Build Pipelines @ Lightweight Java User Group MeetupOpenShift Build Pipelines @ Lightweight Java User Group Meetup
OpenShift Build Pipelines @ Lightweight Java User Group MeetupTobias Schneck
 
Continuous Integration using Jenkins with Python
Continuous Integration using Jenkins with PythonContinuous Integration using Jenkins with Python
Continuous Integration using Jenkins with PythonInexture Solutions
 
CI : the first_step: Auto Testing with CircleCI - (MOSG)
CI : the first_step: Auto Testing with CircleCI - (MOSG)CI : the first_step: Auto Testing with CircleCI - (MOSG)
CI : the first_step: Auto Testing with CircleCI - (MOSG)Soshi Nemoto
 
How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...
How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...
How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...Richard Johansson
 
Agile Bodensee - Testautomation & Continuous Delivery Workshop
Agile Bodensee - Testautomation & Continuous Delivery WorkshopAgile Bodensee - Testautomation & Continuous Delivery Workshop
Agile Bodensee - Testautomation & Continuous Delivery WorkshopMichael Palotas
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applicationsSunil Dalal
 
CICD Pipeline - AWS Azure
CICD Pipeline - AWS AzureCICD Pipeline - AWS Azure
CICD Pipeline - AWS AzureRatan Das
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Amazon Web Services
 
Fundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDFundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDBatyr Nuryyev
 
Attacking Pipelines--Security meets Continuous Delivery
Attacking Pipelines--Security meets Continuous DeliveryAttacking Pipelines--Security meets Continuous Delivery
Attacking Pipelines--Security meets Continuous DeliveryJames Wickett
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 

Similar to GitHub Actions (Nakov at RuseConf, Sept 2022) (20)

GitHub Actions for 5 minutes
GitHub Actions for 5 minutesGitHub Actions for 5 minutes
GitHub Actions for 5 minutes
 
CICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsCICD Pipeline Using Github Actions
CICD Pipeline Using Github Actions
 
Turnkey Continuous Delivery
Turnkey Continuous DeliveryTurnkey Continuous Delivery
Turnkey Continuous Delivery
 
Serving Pull Requests with Jenkins
Serving Pull Requests with JenkinsServing Pull Requests with Jenkins
Serving Pull Requests with Jenkins
 
Deploying Mule Applications with Jenkins, Azure and BitBucket (1).pptx
Deploying Mule Applications with Jenkins, Azure and BitBucket (1).pptxDeploying Mule Applications with Jenkins, Azure and BitBucket (1).pptx
Deploying Mule Applications with Jenkins, Azure and BitBucket (1).pptx
 
TMF2014 CI-CD Workshop Michael Palotas
TMF2014 CI-CD Workshop Michael PalotasTMF2014 CI-CD Workshop Michael Palotas
TMF2014 CI-CD Workshop Michael Palotas
 
OpenShift Build Pipelines @ Lightweight Java User Group Meetup
OpenShift Build Pipelines @ Lightweight Java User Group MeetupOpenShift Build Pipelines @ Lightweight Java User Group Meetup
OpenShift Build Pipelines @ Lightweight Java User Group Meetup
 
AWS Code Services
AWS Code ServicesAWS Code Services
AWS Code Services
 
CICD_1670665418.pdf
CICD_1670665418.pdfCICD_1670665418.pdf
CICD_1670665418.pdf
 
Continuous Integration using Jenkins with Python
Continuous Integration using Jenkins with PythonContinuous Integration using Jenkins with Python
Continuous Integration using Jenkins with Python
 
CI : the first_step: Auto Testing with CircleCI - (MOSG)
CI : the first_step: Auto Testing with CircleCI - (MOSG)CI : the first_step: Auto Testing with CircleCI - (MOSG)
CI : the first_step: Auto Testing with CircleCI - (MOSG)
 
How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...
How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...
How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...
 
Agile Bodensee - Testautomation & Continuous Delivery Workshop
Agile Bodensee - Testautomation & Continuous Delivery WorkshopAgile Bodensee - Testautomation & Continuous Delivery Workshop
Agile Bodensee - Testautomation & Continuous Delivery Workshop
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applications
 
CICD Pipeline - AWS Azure
CICD Pipeline - AWS AzureCICD Pipeline - AWS Azure
CICD Pipeline - AWS Azure
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
Fundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDFundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CD
 
Attacking Pipelines--Security meets Continuous Delivery
Attacking Pipelines--Security meets Continuous DeliveryAttacking Pipelines--Security meets Continuous Delivery
Attacking Pipelines--Security meets Continuous Delivery
 
Docker e git lab
Docker e git labDocker e git lab
Docker e git lab
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 

More from Svetlin Nakov

BG-IT-Edu: отворено учебно съдържание за ИТ учители
BG-IT-Edu: отворено учебно съдържание за ИТ учителиBG-IT-Edu: отворено учебно съдържание за ИТ учители
BG-IT-Edu: отворено учебно съдържание за ИТ учителиSvetlin Nakov
 
Programming World in 2024
Programming World in 2024Programming World in 2024
Programming World in 2024Svetlin Nakov
 
AI Tools for Business and Startups
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and StartupsSvetlin Nakov
 
AI Tools for Scientists - Nakov (Oct 2023)
AI Tools for Scientists - Nakov (Oct 2023)AI Tools for Scientists - Nakov (Oct 2023)
AI Tools for Scientists - Nakov (Oct 2023)Svetlin Nakov
 
AI Tools for Entrepreneurs
AI Tools for EntrepreneursAI Tools for Entrepreneurs
AI Tools for EntrepreneursSvetlin Nakov
 
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023Svetlin Nakov
 
AI Tools for Business and Personal Life
AI Tools for Business and Personal LifeAI Tools for Business and Personal Life
AI Tools for Business and Personal LifeSvetlin Nakov
 
Дипломна работа: учебно съдържание по ООП - Светлин Наков
Дипломна работа: учебно съдържание по ООП - Светлин НаковДипломна работа: учебно съдържание по ООП - Светлин Наков
Дипломна работа: учебно съдържание по ООП - Светлин НаковSvetlin Nakov
 
Дипломна работа: учебно съдържание по ООП
Дипломна работа: учебно съдържание по ООПДипломна работа: учебно съдържание по ООП
Дипломна работа: учебно съдържание по ООПSvetlin Nakov
 
Свободно ИТ учебно съдържание за учители по програмиране и ИТ
Свободно ИТ учебно съдържание за учители по програмиране и ИТСвободно ИТ учебно съдържание за учители по програмиране и ИТ
Свободно ИТ учебно съдържание за учители по програмиране и ИТSvetlin Nakov
 
AI and the Professions of the Future
AI and the Professions of the FutureAI and the Professions of the Future
AI and the Professions of the FutureSvetlin Nakov
 
Programming Languages Trends for 2023
Programming Languages Trends for 2023Programming Languages Trends for 2023
Programming Languages Trends for 2023Svetlin Nakov
 
IT Professions and How to Become a Developer
IT Professions and How to Become a DeveloperIT Professions and How to Become a Developer
IT Professions and How to Become a DeveloperSvetlin Nakov
 
IT Professions and Their Future
IT Professions and Their FutureIT Professions and Their Future
IT Professions and Their FutureSvetlin Nakov
 
How to Become a QA Engineer and Start a Job
How to Become a QA Engineer and Start a JobHow to Become a QA Engineer and Start a Job
How to Become a QA Engineer and Start a JobSvetlin Nakov
 
Призвание и цели: моята рецепта
Призвание и цели: моята рецептаПризвание и цели: моята рецепта
Призвание и цели: моята рецептаSvetlin Nakov
 
What Mongolian IT Industry Can Learn from Bulgaria?
What Mongolian IT Industry Can Learn from Bulgaria?What Mongolian IT Industry Can Learn from Bulgaria?
What Mongolian IT Industry Can Learn from Bulgaria?Svetlin Nakov
 
How to Become a Software Developer - Nakov in Mongolia (Oct 2022)
How to Become a Software Developer - Nakov in Mongolia (Oct 2022)How to Become a Software Developer - Nakov in Mongolia (Oct 2022)
How to Become a Software Developer - Nakov in Mongolia (Oct 2022)Svetlin Nakov
 
Blockchain and DeFi Overview (Nakov, Sept 2021)
Blockchain and DeFi Overview (Nakov, Sept 2021)Blockchain and DeFi Overview (Nakov, Sept 2021)
Blockchain and DeFi Overview (Nakov, Sept 2021)Svetlin Nakov
 
Дигитални професии на бъдещето: не бъдете роботи! (юни 2021)
Дигитални професии на бъдещето: не бъдете роботи! (юни 2021)Дигитални професии на бъдещето: не бъдете роботи! (юни 2021)
Дигитални професии на бъдещето: не бъдете роботи! (юни 2021)Svetlin Nakov
 

More from Svetlin Nakov (20)

BG-IT-Edu: отворено учебно съдържание за ИТ учители
BG-IT-Edu: отворено учебно съдържание за ИТ учителиBG-IT-Edu: отворено учебно съдържание за ИТ учители
BG-IT-Edu: отворено учебно съдържание за ИТ учители
 
Programming World in 2024
Programming World in 2024Programming World in 2024
Programming World in 2024
 
AI Tools for Business and Startups
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and Startups
 
AI Tools for Scientists - Nakov (Oct 2023)
AI Tools for Scientists - Nakov (Oct 2023)AI Tools for Scientists - Nakov (Oct 2023)
AI Tools for Scientists - Nakov (Oct 2023)
 
AI Tools for Entrepreneurs
AI Tools for EntrepreneursAI Tools for Entrepreneurs
AI Tools for Entrepreneurs
 
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
 
AI Tools for Business and Personal Life
AI Tools for Business and Personal LifeAI Tools for Business and Personal Life
AI Tools for Business and Personal Life
 
Дипломна работа: учебно съдържание по ООП - Светлин Наков
Дипломна работа: учебно съдържание по ООП - Светлин НаковДипломна работа: учебно съдържание по ООП - Светлин Наков
Дипломна работа: учебно съдържание по ООП - Светлин Наков
 
Дипломна работа: учебно съдържание по ООП
Дипломна работа: учебно съдържание по ООПДипломна работа: учебно съдържание по ООП
Дипломна работа: учебно съдържание по ООП
 
Свободно ИТ учебно съдържание за учители по програмиране и ИТ
Свободно ИТ учебно съдържание за учители по програмиране и ИТСвободно ИТ учебно съдържание за учители по програмиране и ИТ
Свободно ИТ учебно съдържание за учители по програмиране и ИТ
 
AI and the Professions of the Future
AI and the Professions of the FutureAI and the Professions of the Future
AI and the Professions of the Future
 
Programming Languages Trends for 2023
Programming Languages Trends for 2023Programming Languages Trends for 2023
Programming Languages Trends for 2023
 
IT Professions and How to Become a Developer
IT Professions and How to Become a DeveloperIT Professions and How to Become a Developer
IT Professions and How to Become a Developer
 
IT Professions and Their Future
IT Professions and Their FutureIT Professions and Their Future
IT Professions and Their Future
 
How to Become a QA Engineer and Start a Job
How to Become a QA Engineer and Start a JobHow to Become a QA Engineer and Start a Job
How to Become a QA Engineer and Start a Job
 
Призвание и цели: моята рецепта
Призвание и цели: моята рецептаПризвание и цели: моята рецепта
Призвание и цели: моята рецепта
 
What Mongolian IT Industry Can Learn from Bulgaria?
What Mongolian IT Industry Can Learn from Bulgaria?What Mongolian IT Industry Can Learn from Bulgaria?
What Mongolian IT Industry Can Learn from Bulgaria?
 
How to Become a Software Developer - Nakov in Mongolia (Oct 2022)
How to Become a Software Developer - Nakov in Mongolia (Oct 2022)How to Become a Software Developer - Nakov in Mongolia (Oct 2022)
How to Become a Software Developer - Nakov in Mongolia (Oct 2022)
 
Blockchain and DeFi Overview (Nakov, Sept 2021)
Blockchain and DeFi Overview (Nakov, Sept 2021)Blockchain and DeFi Overview (Nakov, Sept 2021)
Blockchain and DeFi Overview (Nakov, Sept 2021)
 
Дигитални професии на бъдещето: не бъдете роботи! (юни 2021)
Дигитални професии на бъдещето: не бъдете роботи! (юни 2021)Дигитални професии на бъдещето: не бъдете роботи! (юни 2021)
Дигитални професии на бъдещето: не бъдете роботи! (юни 2021)
 

Recently uploaded

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 

Recently uploaded (20)

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 

GitHub Actions (Nakov at RuseConf, Sept 2022)

  • 1. Continuous Integration (CI), Continuous Delivery (CD), Continuous Deployment, CI/CD Pipelines, GitHub Actions Building a CI/CD System with GitHub Actions 1 Software University https://softuni.bg Svetlin Nakov, PhD Co-Founder and Innovations Manager @ SoftUni https://nakov.com
  • 2. 2  Software engineer, tech trainer, entrepreneur author of 16 books nakov.com  4 successful tech education initiatives  National Academy for Software Development (NASD)  Telerik Software Academy  SoftUni (Software University)  Private IT High School "SoftUni Svetlina" About Svetlin Nakov
  • 3. 3  Intro to Continuous Integration (CI), Continuous Delivery (CD), Continuous Deployment (CD), and CI/CD Pipelines  Intro to GitHub Actions  Building CI workflow  Building CD workflow  Live Demo: Build CI System for JS and .NET Apps Contents
  • 4. The CI/CD Pipeline Continuous Integration / Delivery
  • 5.  CI/CD pipeline  Continuously integrate and release new features  Continuous integration (CI)  Write code, test and integrate it in the product  Continuous delivery (CD)  Continuously release new features  QAs maintain and monitor the CI/CD pipeline CI/CD Pipeline 5
  • 6.  Continuous integration (CI)  Integrating the code from different developers frequently (several times a day)  Automated building, and testing the software  Typically, after each Git push in the main branch  Allows finding integration problems and bugs early  Continuously maintain software quality Continuous Integration (CI)
  • 7.  Continuous delivery (CD)  Keeping your codebase deployable at any point  CD continuously verifies that  Software builds correctly  Passes automated tests  Has all the necessary configuration and assets for deployment in production Continuous Delivery (CD)
  • 8.  Continuous deployment (CD)  Continuous automated deployment of the software  E.g. after each git push  Deployment is typically done to a testing environment  Example: https://dev.myproduct.com  Sometimes directly to the production servers Continuous Deployment (CD)
  • 9.  CI/CD pipeline == CI + CD  Continuously integrate, test and release new features  On git push, the CI/CD pipeline does automatically:  Build the software (compile, package, sign, etc.)  Run the automated tests (unit, integration)  Deploy on the testing environment + run E2E tests  Or only prepare for deployment  Or deploy directly on production CI/CD Pipeline
  • 11.  GitHub Actions  Cloud-based software workflow automation environment (CI/CD on the GitHub cloud)  Allows creating CI/CD pipelines to build, test and deploy software projects, directly from a GitHub repo  https://github.com/features/actions  Free for public repos + 2000 mins per month for private repos with the free plan GitHub Actions 11
  • 12.  Events execute workflows (one or several jobs, running in parallel)  Workflows hold jobs (e. g. build, check security, deploy)  Jobs hold steps (e. g. "checkout the code", "install .NET", "run tests", …)  Steps hold actions (commands like `dotnet test`) GitHub Actions: Concepts event workflow job job step 1 action 1 action 2 step 2 action 12
  • 13. CI Workflow in GitHub Actions Building a CI System for Existing JS App 13
  • 14.  We have a JS App (with integration tests):  Code: https://github.com/nakov/MVC-app-integration-tests-example-mocha  Live: https://nakov-mvc-node-app.herokuapp.com Sample JS App: Students Registry 14
  • 15.  Clone the app repo  Restore the Node packages:  Run the Mocha integration tests Build and Run Locally (by Hand) git clone https://github.com/nakov/MVC-app-integration- tests-example-mocha npm install npm test 15
  • 16.  Let's implement a CI/CD pipeline in GitHub Actions  Build & test workflow  Runs on push  Deploy workflow  Runs manually CI/CD Pipeline in GitHub Actions 16
  • 17. name: Build and Test on: [push] jobs: build-and-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 - run: npm ci - run: npm test GitHub Actions: Build & Test Workflow mocha-tests.yml Auto run on each "push" Install Node.js Install dependencies and build the app Run the automated tests Clone the repo 17
  • 18. name: Deploy to Heroku on: [workflow_dispatch] jobs: deploy-to-heroku: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: akhileshns/heroku-deploy@v3.6.8 with: heroku_app_name: "some-app-name" heroku_email: ${{secrets.HEROKU_EMAIL}} heroku_api_key: ${{secrets.HEROKU_API_KEY}} GitHub Actions: Manual Deploy Workflow deploy.yml Run the workflow manually Clone the repo Deploy in Heroku 18
  • 19.  GitHub Project  Settings  Secrets Security Warning: Use Repository Secrets! 19
  • 20. Live Demo CI Workflow for JS App in GitHub Actions https://github.com/nakov/MVC-app- integration-tests-example-mocha/actions 20
  • 21. .NET MVC App + REST API + Desktop App + Android App CI System for More Complex System 21
  • 22.  We have a .NET Web app (with tests): Continuous Integration for .NET Apps  Code: https://github.com/nakov/Eventures 22
  • 23. GitHub Actions: Build & Test Workflow name: Build and Test on: [push] jobs: WebApp-tests: # Buld and run tests for the Eventures Web App … WebApi-tests: # Buld and run tests for the Eventures Web API … DesktopApp-tests: # Buld and run tests for the Eventures Desktop App … AndroidApp-tests: # Buld and run tests for the Eventures Android App … dotnet-build.yml 23
  • 24. GitHub Actions: Web App Tests Job 24
  • 25. GitHub Actions: Web API Tests Job 25
  • 26. GitHub Actions: Desktop App Tests Job 26
  • 27. GitHub Actions: Android App Tests Job 27
  • 28. Live Demo CI Workflow for .NET App in GitHub Actions https://github.com/nakov/Eventures/blob/main/ .github/workflows/dotnet-build.yml 28

Editor's Notes

  1. Continuous integration (CI) is the practice of frequent integration, together with automated building and automated testing of the software after each push in the master branch. This ensures that the new code integrates correctly with the existing code: compiles without errors and passes all existing automated tests. Continuous integration (CI), together with automated testing allows developers to find the bugs early and to continuously maintain the quality of the software.
  2. Continuous Delivery (CD) is the practice of keeping your codebase deployable at any point. This means to continuously verify that the software builds correctly, passes the automated tests and have all the configuration necessary to push it into production. Continuous delivery (CD) allows to integrate, deploy and release new features continuously in short release cycles with a lot of automation.
  3. Continuous Deployment (CD) is the practice of automatically deploy the software to a testing or production environment after each significant change (e.g. after "git push" in the master branch).
  4. Continuous integration and continuous delivery (the so-called CI/CD pipeline) is a practice in modern software development, where the code is integrated, tested and deployed continuously and automatically after each significant change in the code.