Alex/cos 3288 website not populating on prospects #3100
Workflow file for this run
This file contains 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: user-admin-api | |
on: | |
push: | |
branches: [ "otter" ] | |
paths: | |
- packages/server/customer-os-common-module/** | |
- packages/server/customer-os-common-auth/** | |
- packages/server/customer-os-postgres-repository/** | |
- packages/server/customer-os-neo4j-repository/** | |
- packages/server/events-processing-proto/** | |
- packages/server/customer-os-api-api/** | |
- packages/server/customer-os-api-api-sdk/** | |
- packages/server/events-processing-platform/** | |
- packages/server/events-processing-platform-subscribers/** | |
- packages/server/user-admin-api/** | |
- .github/workflows/build-user-admin-api.yml | |
pull_request: | |
paths: | |
- packages/server/customer-os-common-module/** | |
- packages/server/customer-os-common-auth/** | |
- packages/server/customer-os-postgres-repository/** | |
- packages/server/customer-os-neo4j-repository/** | |
- packages/server/events-processing-proto/** | |
- packages/server/customer-os-api-api/** | |
- packages/server/customer-os-api-api-sdk/** | |
- packages/server/events-processing-platform/** | |
- packages/server/events-processing-platform-subscribers/** | |
- packages/server/user-admin-api/** | |
- .github/workflows/build-user-admin-api.yml | |
release: | |
types: [created, edited] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }}/user-admin-api | |
permissions: | |
contents: read | |
pull-requests: read | |
defaults: | |
run: | |
working-directory: ./packages/server/user-admin-api | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Build | |
working-directory: ./packages/server/user-admin-api | |
run: make all | |
- name: Configure Test Folders | |
id: test-folders | |
run: | | |
test_folders=$(go list ./... | grep -v /gen | grep -v /test | paste -sd "," -) | |
echo "{name}={test_folders}" >> $GITHUB_OUTPUT | |
- name: Test | |
run: | | |
go install gotest.tools/gotestsum@latest | |
gotestsum --junitfile unit-tests.xml -- -coverprofile=cover.out -coverpkg=${{ steps.test-folders.outputs.test_folders }} ./... | |
- name: Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() # run this step even if previous step failed | |
with: | |
report_paths: packages/server/user-admin-api/unit-tests.xml # Path to test results | |
include_passed: true | |
annotate_only: true | |
detailed_summary: true | |
- name: Compute Code Coverage | |
id: compute_code_coverage | |
working-directory: ./packages/server/user-admin-api | |
run: | | |
echo "## Code Coverage" >> $GITHUB_STEP_SUMMARY | |
echo "|Filename|Function|Coverage|" >> $GITHUB_STEP_SUMMARY | |
echo "|--------|--------|--------|" >> $GITHUB_STEP_SUMMARY | |
go tool cover -func=cover.out |sed -r 's/[[:space:]]+/|/g'|sed -r 's/$/|/g'|sed -r 's/^/|/g' >> $GITHUB_STEP_SUMMARY | |
build-publish: | |
needs: | |
- test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3.1.0 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ secrets.REPOSITORY_READ_WRITE_USERNAME }} | |
password: ${{ secrets.REPOSITORY_READ_WRITE_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5.5.1 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: Push Docker image | |
uses: docker/build-push-action@v5.3.0 | |
with: | |
context: ./packages/server/ | |
file: ./packages/server/user-admin-api/Dockerfile | |
push: ${{ github.ref_name == 'otter' || github.event_name == 'release' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |