Skip to content

Commit

Permalink
Merge pull request #9 from software-students-spring2024/Jacklyn22
Browse files Browse the repository at this point in the history
Added workflows.
  • Loading branch information
Jacklyn22 authored May 1, 2024
2 parents fc9083f + df64de1 commit d41e8ed
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
27 changes: 27 additions & 0 deletions machine-learning-client/.github/workflows/build-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI / CD

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run tests
run: |
# Run your test commands
pytest
38 changes: 38 additions & 0 deletions web-app/.github/workflows/build-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI / CD

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run Flask tests
run: |
# Add commands to run Flask tests
pytest
- name: Build Docker Image
run: |
docker build -t web-app .
- name: Docker Login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push Docker Image
run: |
docker push username/web-app:latest

0 comments on commit d41e8ed

Please sign in to comment.