# Verify data structures GitHub Actions automation workflow
> Test your GitHub Actions workflow by creating a pull request with data structure changes and verifying automated validation and deployment.
> Source: https://docs.snowplow.io/tutorials/data-structures-in-git/verify-github-setup/
> Documentation index: https://docs.snowplow.io/llms.txt

Now we have our workflows in place let's work through an example. Our login data structure needs some attention. Our requirements have changed and rather than 'success' and 'failure' the login result will now need to report numbers and not strings. So instead of `[success, failure]` it'll be `[200, 403]`.

Having created a [new branch](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging) called `login-results-error-codes` and making the changes locally we should end up here:

```bash
--- a/data-structures/com.example/login.yaml
+++ b/data-structures/com.example/login.yaml
@@ -10,9 +10,9 @@ data:
    vendor: com.example
    name: login
    format: jsonschema
-    version: 1-0-0
+    version: 1-0-1
  type: object
  properties:
    result:
-      enum: [success, failure]
+      enum: [200, 403]
  additionalProperties: false
```

That all looks good so we'll go ahead and push to github and [create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).

We wait patiently for our validate on pull request workflow to run.

![GitHub pull request checks panel showing \&quot;All checks have failed\&quot; with the validate-pull-request.yml workflow failing after 8 seconds](/assets/images/worked-pr-checks-617ef11e0920c15371b3f53399ddb864.png)

Validation has failed. To identify the problem we open the 'file' tab on the pull request and see..

![GitHub pull request diff for login.yaml showing the enum change from \[success, failure\] to \[200, 403\], with GitHub Actions annotations indicating missing description properties and an incompatible type change from String to Integer requiring a version 2-0-0 bump](/assets/images/worked-diff-annotated-b2288d79b1056cbcf9160efc0d829925.png)

> **Note:** Validation only takes your configured [warehouse and lake destinations](https://console.snowplowanalytics.com/destinations/warehouses-lakes) into account.

Together with the description warnings we forgot to fix earlier we have some errors. Changing the values of the enum would change the type of the `result` property which will cause problems further down the line for our data. The error suggests we need to make a major version bump to avert disaster. We'll do that (and add descriptions).

Our next attempt:

```bash
--- a/data-structures/com.example/login.yaml
+++ b/data-structures/com.example/login.yaml
@@ -10,9 +10,11 @@ data:
    vendor: com.example
    name: login
    format: jsonschema
-    version: 1-0-0
+    version: 2-0-0
  type: object
+  description: Login outcome event
  properties:
    result:
-      enum: [success, failure]
+      description: The resulting http error code of a login request
+      enum: [200, 403]
  additionalProperties: false
```

And the workflow result..

![GitHub pull request checks panel showing \&quot;All checks have passed\&quot; with 1 successful check and the Merge pull request button available](/assets/images/worked-pr-checks-ok-8029034775bea79ec28a93f51e200fa2.png)

Validation has passed. Now our colleagues can feedback on our changes and if everyone is happy we can merge to `develop` which will trigger our `publish-develop.yml` workflow.

![GitHub Actions showing the publish-develop.yml workflow successfully triggered by merging pull request #1 (login-results-error-codes) into the develop branch, completing in 25 seconds](/assets/images/worked-pub-dev-8f0d2efaa5f2dbead6a73d788976404e.png)

Finally, once we are convinced everything works we can open another pull request from `develop` to `main`, merge that and trigger our `publish-production.yml` workflow.
