Skip to content

Commit

Permalink
Update ms5.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
eoa21004 authored Oct 31, 2024
1 parent 9c2a833 commit b6b002e
Showing 1 changed file with 8 additions and 31 deletions.
39 changes: 8 additions & 31 deletions .github/workflows/ms5.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: API CI/CD
# This is a trigger for any push to the repo, and tells github when the actions have to be run
# Every time we do a push, the action will be executed
# The actions should be run only when there is a push from main and develop
on:
name: API CI/CD

# This is a trigger for any push to the repo
on:
push:
branches:
- MileStone5eric

#Tells github actions what to execute when trigger condition is met
jobs:
# Each job runs in parallel
tests: #This is the job name
name_your_job_whatever_you_want:

# runs-on indicates which GitHub "Runners" will run this CICD pipeline
# For all CSE-2102 repos, just use the following line as is
Expand All @@ -32,36 +30,15 @@ jobs:
python-version: ${{ matrix.python-version }}
# Pylint is a static code analysis tool. Use this block as is to install pylint
# in the Docker container running the job
- name: Install pylint
run: |
python -m pip install --upgrade pip
pip install pylint


# Pytest is for unit testing your python code. Use this block as is to
# install pytest in the Docker container running the job
- name: Install pytest
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Stop Docker
run: |
docker stop $(docker ps -q)
- name: Remove Docker
run: |
docker rm $(docker ps -a -q)
- name: Build Docker
run: |
docker build -f Backend/Docker -t doc Backend/
- name: Run Docker
run: |
docker run -d -p 5000:5000 doc
if [ -f ./Backend/requirements.txt ]; then pip install -r ./Backend/requirements.txt; fi
# Run pytest on your pulled codebase
- name: Test with pytest
run: |
Expand Down

0 comments on commit b6b002e

Please sign in to comment.