feat: HandleDashboardUserPostLogin API #16
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: ci | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
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: | |
setup: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- name: Load cached 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 dependencies | |
if: steps.cached-go-dependencies.outputs.cache-hit != 'true' | |
shell: bash | |
run: go get -v -t ./... | |
lint: | |
needs: setup | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- name: Load cached 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 dependencies | |
if: steps.cached-go-dependencies.outputs.cache-hit != 'true' | |
shell: bash | |
run: go get -v -t ./... | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
continue-on-error: true | |
with: | |
version: latest | |
test: | |
needs: setup | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- name: Load cached 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 dependencies | |
if: steps.cached-go-dependencies.outputs.cache-hit != 'true' | |
shell: bash | |
run: go get -v -t ./... | |
- id: auth | |
name: Authenticate with GCP | |
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: Run Tests | |
run: go test ./... |