From 690f3bec4da09f492eb40a61634f09d8a2bc38db Mon Sep 17 00:00:00 2001 From: Gabriel de Quadros Ligneul <8294320+gligneul@users.noreply.github.com> Date: Tue, 19 Sep 2023 14:41:09 -0300 Subject: [PATCH] feat(graphql): move schema to Github artifact Remove the generated schema from the repository and generate it automatically on the CI. --- .github/workflows/build.yml | 10 ++++++++++ CHANGELOG.md | 1 + offchain/{graphql-server => }/schema.graphql | 0 3 files changed, 11 insertions(+) rename offchain/{graphql-server => }/schema.graphql (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe6252fc7..74be72696 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,6 +68,16 @@ jobs: - name: Run tests run: cargo test + - name: Generate GraphQL schema + run: ./target/debug/generate-schema + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: graphql-schema + path: offchain/schema.graphql + if-no-files-found: error + build_docker: runs-on: ubuntu-22.04 needs: diff --git a/CHANGELOG.md b/CHANGELOG.md index 904e3a42c..5b00164a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Standardized log libraries and configuration +- Moved GraphQL schema generation to the CI. Now it is distributed as a Github artifact ### Removed diff --git a/offchain/graphql-server/schema.graphql b/offchain/schema.graphql similarity index 100% rename from offchain/graphql-server/schema.graphql rename to offchain/schema.graphql