github actions added #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI/CD Pipeline for Book Tracker API | |
| on: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Checkout the code | |
| - name: Checkout code | |
| uses: actions/[email protected] | |
| # Step 2: Set up Go environment | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: 1.24 | |
| # Step 3: Install dependencies | |
| - name: Install Dependencies | |
| run: | | |
| go mod tidy | |
| # Step 4: Build the application | |
| - name: Docker Setup Buildx | |
| uses: docker/[email protected] | |
| # Step 5: Setup PostgreSQL | |
| - name: Setup PostgreSQL | |
| uses: Harmon758/[email protected] | |
| # Step 6: Run Keploy Test Suite | |
| - name: Run Keploy Test Suite | |
| run: | | |
| export KEPLOY_API_KEY=Ee6Tq2LOx77IhixbEg== | |
| keploy test-suite --app=03d24177-315c-4ee1-a3ac-64ed0ab38567 --base-path http://localhost:8080/books --cloud |