Skip to content

Commit

Permalink
Merge pull request #74 from AbdulrhmanGoni/continuous-integration-wor…
Browse files Browse the repository at this point in the history
…kflow

Create continuous integration workflow
  • Loading branch information
AbdulrhmanGoni authored Nov 1, 2024
2 parents 1a7b762 + b370595 commit 4946c6d
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/tests.yaml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Tests Workflow
name: Continous Integration Workflow

on:
push:
workflow_dispatch:

jobs:
setup-and-run-tests:
run-tests-and-collect-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -26,7 +26,25 @@ jobs:
run: bun test --coverage --coverage-reporter=lcov

- name: Upload code coverage to Codecov
if: github.ref_name == 'main'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info

build-and-deploy:
if: github.ref_name == 'main'
needs: run-tests-and-collect-coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build Docker Image
run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/llms-tdm-server .

- name: Log in to Docker hub
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin

- name: Push the Docker Image to Docker hub
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/llms-tdm-server

0 comments on commit 4946c6d

Please sign in to comment.