Skip to content

Commit

Permalink
Merge pull request #17 from Avinya-Foundation/test-client-generator
Browse files Browse the repository at this point in the history
Add workflow to generate client
  • Loading branch information
rukmal authored Sep 27, 2022
2 parents f77c465 + 1601e8a commit 954ee5d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: GraphQL API tests
name: Global data service push workflow

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

bal-test:
api-test:
name: GraphQL API Tests
runs-on: ubuntu-22.04
needs: push-db-container
Expand Down Expand Up @@ -85,3 +85,28 @@ jobs:
args: test
env:
WORKING_DIR: api
generate-graphql-client-job:
name: Generate GraphQL Client
needs: api-test
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
if: ${{ !env.ACT }} # Only run on GitHub Actions
uses: actions/checkout@v3
- name: Generate GraphQL Client
if: ${{ !env.ACT }}
uses: ballerina-platform/ballerina-action@394eb82cc07e020948fee8d1474143ae393147f4
with:
args: graphql -i graphql.config.yaml -o ../../client/
env:
WORKING_DIR: api/schema
- name: Display changes in generated client
run: |
git add . --force
git diff HEAD
- name: Commit sample artifacts to Pull Request
uses: EndBug/add-and-commit@v9 # See: https://github.com/marketplace/actions/add-commit
with:
add: "client --force"
default_author: github_actions
message: "[GitHub Actions] Commit generated GraphQL client"
2 changes: 1 addition & 1 deletion client/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "avinyafoundation"
name = "global_data_client"
version = "1.0.0"
version = "0.1.2"
distribution = "2201.1.1"

[build-options]
Expand Down
2 changes: 1 addition & 1 deletion client/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies-toml-version = "2"
[[package]]
org = "avinyafoundation"
name = "global_data_client"
version = "1.0.0"
version = "0.1.2"
dependencies = [
{org = "ballerina", name = "graphql"},
{org = "ballerina", name = "http"},
Expand Down
1 change: 1 addition & 0 deletions client/Package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Avinya Foundation Global Data Service

0 comments on commit 954ee5d

Please sign in to comment.