Skip to content

Commit

Permalink
Merge pull request #24 from HumairAK/add_unit_test_wf
Browse files Browse the repository at this point in the history
Add unit test wf
  • Loading branch information
HumairAK authored Mar 11, 2024
2 parents 8517013 + 9b6de81 commit 20c08cd
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/resources/unittests/application_default_credentials.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "service_account",
"project_id": "your-project-id",
"private_key_id": "your-private-key-id",
"private_key": "-----BEGIN PRIVATE KEY-----\nYour private key content\n-----END PRIVATE KEY-----\n",
"client_email": "[email protected]",
"client_id": "your-client-id",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/[email protected]"
}
29 changes: 29 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Unit Tests
on:
pull_request:
paths:
- go.mod
- go.sum
- backend/**
types:
- opened
- reopened
- closed
- synchronize
workflow_dispatch:
env:
RESOURCES_DIR: ${{ github.workspace }}/.github/resources
jobs:
functest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.20.x'
- name: Run Unit Test
working-directory: ${{ github.workspace }}/backend/src
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ env.RESOURCES_DIR }}/unittests/application_default_credentials.json
run: go test ./...
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,16 @@ spec:
volumeMounts:
- mountPath: /kfp-launcher
name: kfp-launcher
- mountPath: /gcs
name: gcs-scratch
- mountPath: /s3
name: s3-scratch
- mountPath: /minio
name: minio-scratch
- mountPath: /.local
name: dot-local-scratch
- mountPath: /.cache
name: dot-cache-scratch
initContainers:
- command:
- launcher-v2
Expand All @@ -168,6 +178,16 @@ spec:
volumes:
- emptyDir: {}
name: kfp-launcher
- emptyDir: { }
name: gcs-scratch
- emptyDir: { }
name: s3-scratch
- emptyDir: { }
name: minio-scratch
- emptyDir: { }
name: dot-local-scratch
- emptyDir: { }
name: dot-cache-scratch
- dag:
tasks:
- arguments:
Expand Down
20 changes: 20 additions & 0 deletions backend/src/v2/compiler/argocompiler/testdata/hello_world.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ spec:
volumeMounts:
- mountPath: /kfp-launcher
name: kfp-launcher
- mountPath: /gcs
name: gcs-scratch
- mountPath: /s3
name: s3-scratch
- mountPath: /minio
name: minio-scratch
- mountPath: /.local
name: dot-local-scratch
- mountPath: /.cache
name: dot-cache-scratch
initContainers:
- command:
- launcher-v2
Expand All @@ -151,6 +161,16 @@ spec:
volumes:
- emptyDir: {}
name: kfp-launcher
- emptyDir: {}
name: gcs-scratch
- emptyDir: {}
name: s3-scratch
- emptyDir: {}
name: minio-scratch
- emptyDir: {}
name: dot-local-scratch
- emptyDir: {}
name: dot-cache-scratch
- dag:
tasks:
- arguments:
Expand Down

0 comments on commit 20c08cd

Please sign in to comment.