Skip to content

feat(infrastructure): add github workflows for monorepo #1

feat(infrastructure): add github workflows for monorepo

feat(infrastructure): add github workflows for monorepo #1

Workflow file for this run

name: 'Tests (Golang)'
on:
push:
pull_request:
branches:
- main
paths:
- 'go-services/**'
- 'go-shared/**'
- 'go.*'
env:
GCP_OIDC_PROVIDER_NAME: github-provider
GCP_PROJECT_ID: basemind-ai-development
GCP_PROJECT_NUMBER: 78794879644
GCP_SERVICE_ACCOUNT_NAME: firebase-adminsdk-frgvx
GCP_WORKLOAD_IDENTITY_POOL: dev-pool
jobs:
test:

Check failure on line 18 in .github/workflows/ci-tests-go.yaml

View workflow run for this annotation

GitHub Actions / Tests (Golang)

Invalid workflow file

The workflow is not valid. .github/workflows/ci-tests-go.yaml (Line: 18, Col: 5): The workflow must contain at least one job with no dependencies.
needs: setup
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- name: Setup Golang
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Load cached Golang dependencies
id: cached-go-dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: go-${{ inputs.go_version }}-v1.0-${{ hashFiles('**/go.sum') }}
- name: Install Golang dependencies
if: steps.cached-go-dependencies.outputs.cache-hit != 'true'
shell: bash
run: go get -v -t ./...
- name: Authenticate with GCP
id: auth
uses: google-github-actions/[email protected]
with:
workload_identity_provider: 'projects/${GCP_PROJECT_NUMBER}/locations/global/workloadIdentityPools/${GCP_WORKLOAD_IDENTITY_POOL}/providers/${GCP_OIDC_PROVIDER_NAME}'
service_account: '${GCP_SERVICE_ACCOUNT_NAME}@${GCP_PROJECT_ID}.iam.gserviceaccount.com'
- name: Test
run: go test ./...