Skip to content

Commit

Permalink
Create CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
rgallardone committed Jun 27, 2024
1 parent 5d29e21 commit e64db91
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 'Continuous Integration'

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install dependencies
run: |
pip install -r requirements.txt -r requirements-dev.txt -r requirements-test.txt
- name: Run model tests
run: make model-test

- name: Run API tests
run: make api-test
9 changes: 9 additions & 0 deletions docs/challenge.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,12 @@ The API is deployed as a Cloud Run Service that exposes a public endpoint. In or
After the deployment is completed, the API is available at https://delay-model-dpmrk4cwxq-uw.a.run.app, and the prediction endpoint is available at https://delay-model-dpmrk4cwxq-uw.a.run.app/predict. We can test the service using Postman or run the provided stress test.
The results of the stress test are an error rate of 0%, an average response time of 343ms, a maximum response time of 743ms and the API is able to respond to 87.69 requests per second.
## CI/CD Pipeline
On this final step, the goal is to setup a proper CI/CD pipeline.
The CI workflows focus on running the tests and assesing the quality of the code each time there's a push to the repository, with the goal of detecting bugs earlier, correcting code faster and ensuring good code quality practices.
The CD workflows focus on training the model, deploying the API and running the stress testing against it. These workflows only run when there's a push to the `main`, `develop` or `release` branches on the repository.cua
7 changes: 0 additions & 7 deletions workflows/cd.yml

This file was deleted.

7 changes: 0 additions & 7 deletions workflows/ci.yml

This file was deleted.

0 comments on commit e64db91

Please sign in to comment.