<commit_before># Running Serving Conformance Tests against Google Cloud Run

1. Check out your Knative Serving fork

    Create your own fork of the Knative Serving repository. Clone it to your machine:

    ```sh
    git clone <EMAIL>:<YOUR_GITHUB_USERNAME>/serving.git
    cd serving
    ```

1. Build and upload the test images

    ```sh
    export KO_DOCKER_REPO='gcr.io/my-gcp-project'
    ./test/upload-test-images.sh
    ```

1. Configure client objects

    Save the following content to a file, for example `~/kubeconfig_for_cloud_run`.

    ```yaml
    apiVersion: v1
    clusters:
    - cluster:
        server: https://us-central1-run.googleapis.com
        name: hosted
    contexts:
    - context:
        cluster: hosted
        user: hosteduser
        name: hostedcontext
    current-context: hostedcontext
    kind: Config
    preferences: {}
    users:
    - name: hosteduser
        user:
        auth-provider:
            config: null
            name: gcp
    ```

    This file configures the client objects to connect to Cloud Run server in region `us-central1`.
    Change this value if you’d like to use a different [region](https://cloud.google.com/run/docs/locations).

    Make sure your [gcloud](https://cloud.google.com/sdk/docs/install) account has the Cloud Run
    Admin role ([roles/run.admin](https://cloud.google.com/run/docs/reference/iam/roles)).
    Authorize your gcloud account credentials:

    ```sh
    gcloud auth login
    gcloud auth application-default login
    ```

1. Run the tests

    Run conformance tests for API v1:

    ```sh
    go test -v -tags=e2e -count=1 ./test/conformance/api/v1 \
    -kubeconfig ~/kubeconfig_for_cloud_run -disable-logstream=true -disable-optional-api=true \
    -resolvabledomain=true -test-namespace=my-gcp-project \
    -request-headers="Authorization,Bearer $(gcloud auth print-identity-token)" \
    -exceeding-memory-limit-size=10000
    ```

    Run conformance tests for runtime:<commit_msg>Fix incorrect yaml format (#92)<commit_after># Running Serving Conformance Tests against Google Cloud Run

1. Check out your Knative Serving fork

    Create your own fork of the Knative Serving repository. Clone it to your machine:

    ```sh
    git clone <EMAIL>:<YOUR_GITHUB_USERNAME>/serving.git
    cd serving
    ```

1. Build and upload the test images

    ```sh
    export KO_DOCKER_REPO='gcr.io/my-gcp-project'
    ./test/upload-test-images.sh
    ```

1. Configure client objects

    Save the following content to a file, for example `~/kubeconfig_for_cloud_run`.

    ```yaml
    apiVersion: v1
    clusters:
    - cluster:
        server: https://us-central1-run.googleapis.com
        name: hosted
    contexts:
    - context:
        cluster: hosted
        user: hosteduser
        name: hostedcontext
    current-context: hostedcontext
    kind: Config
    preferences: {}
    users:
    - name: hosteduser
      user:
        auth-provider:
            config: null
            name: gcp
    ```

    This file configures the client objects to connect to Cloud Run server in region `us-central1`.
    Change this value if you’d like to use a different [region](https://cloud.google.com/run/docs/locations).

    Make sure your [gcloud](https://cloud.google.com/sdk/docs/install) account has the Cloud Run
    Admin role ([roles/run.admin](https://cloud.google.com/run/docs/reference/iam/roles)).
    Authorize your gcloud account credentials:

    ```sh
    gcloud auth login
    gcloud auth application-default login
    ```

1. Run the tests

    Run conformance tests for API v1:

    ```sh
    go test -v -tags=e2e -count=1 ./test/conformance/api/v1 \
    -kubeconfig ~/kubeconfig_for_cloud_run -disable-logstream=true -disable-optional-api=true \
    -resolvabledomain=true -test-namespace=my-gcp-project \
    -request-headers="Authorization,Bearer $(gcloud auth print-identity-token)" \
    -exceeding-memory-limit-size=10000
    ```

    Run conformance tests for runtime:
{'fraction_non_alphanumeric': 0.10065261044176707, 'fraction_numerical': 0.00853413654618474, 'mean_word_length': 2.7138863000931965, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5376076', 'n_tokens_mistral': 1236, 'n_tokens_neox': 1187, 'n_words': 355}