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

chore: run coverage with reusable workflow #28

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Changes from all commits
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
23 changes: 9 additions & 14 deletions .github/workflows/deploy-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
Loading