diff --git a/.github/workflows/deploy-staging.yaml b/.github/workflows/deploy-staging.yaml index 6d080ea..c0a4419 100644 --- a/.github/workflows/deploy-staging.yaml +++ b/.github/workflows/deploy-staging.yaml @@ -9,23 +9,19 @@ on: jobs: run-tests: name: Run tests - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.23.0 - - name: Test - run: go test -v -race -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic ./test - - uses: codecov/codecov-action@v2 - with: - files: ./coverage.txt + uses: Informasjonsforvaltning/workflows/.github/workflows/coverage-go.yaml@main + with: + go_version: 1.23 + coverage_file_path: ./coverage.txt + test_path: ./test + secrets: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} build-ai-project-service: name: Build query-cache when pull request is created if: github.event.pull_request.draft == false + needs: run-tests uses: Informasjonsforvaltning/workflows/.github/workflows/build-push.yaml@main with: app_name: ai-project-service @@ -39,7 +35,6 @@ jobs: deploy: name: Deploy to staging environment with reusable workflow - if: github.event.pull_request.draft == false needs: [ run-tests, build-ai-project-service ] uses: Informasjonsforvaltning/workflows/.github/workflows/kustomize-deploy.yaml@main with: