Skip to content

Commit

Permalink
fix: fixing ci.yml error
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeversiane committed Jun 13, 2024
1 parent e6c9441 commit 975c89a
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,37 @@ jobs:
with:
go-version-file: go.mod

- name: Download dependencies
run: go mod download

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./internal/...

# security:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v3
security:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

# - name: Run Snyk to check for Go vulnerabilities
# uses: snyk/actions/golang@master
# with:
# args: --severity-threshold=critical
- name: Run Snyk to check for Go vulnerabilities
uses: snyk/actions/golang@master
with:
args: --severity-threshold=critical

test:
needs: [build]
needs: [build, security]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Set up Docker Compose
run: docker-compose -f docker-compose.ci.yml up -d --build

- name: Wait for services to be ready
run: docker-compose -f docker-compose.ci.yml run --rm wait-for-it.sh db:5432 --timeout=60 --strict -- echo "Database is up"

- name: Run project
run: make ci

Expand All @@ -67,10 +73,12 @@ jobs:
- name: Run E2E tests
run: go test -v ./e2e/...

- if: failure()
- name: Get Docker Compose status
if: failure()
run: docker-compose -f docker-compose.ci.yml ps

- if: failure()
- name: Get Docker Compose logs
if: failure()
run: docker-compose -f docker-compose.ci.yml logs

- name: Tear Down
Expand Down

0 comments on commit 975c89a

Please sign in to comment.