Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Session 2 to main #2

Merged
merged 2 commits into from
Sep 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update run-tests.yml
Added new branch for updates and included variables for docker connection
realgoob authored Sep 27, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 0af0b7e074c48055f8e390bb31dc37f1bd3e9b60
28 changes: 26 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Run Tests on Push to session-1 and Pull Request to main
name: CI/CD Pipeline

on:
push:
branches:
- session-1
- session-2
pull_request:
branches:
- main
@@ -19,7 +20,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11' # Specify the Python version you want to use
python-version: '3.11'

- name: Install dependencies
run: |
@@ -29,3 +30,26 @@ jobs:
- name: Run tests
run: |
pytest --maxfail=1 --disable-warnings

build_and_push:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/tech-trek:${{ github.sha }}
Loading