Skip to content

Commit

Permalink
CI/CD: Make release dependent on tests. (#155)
Browse files Browse the repository at this point in the history
* CI/CD: Make release dependent on tests.

* CI/CD: Reuse test-plugin workflow on release.

* CI/CD: Upload schema.graphql before diff

* CI/CD: Restore on push call
  • Loading branch information
theodesp authored Oct 10, 2023
1 parent 75e5c1a commit 1415e91
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- main

jobs:
call-workflow-test-plugin:
uses: ./.github/workflows/test-plugin.yml
release:
name: Release
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/schema-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ jobs:
- name: Install Schema Inspector
run: |
npm install @graphql-inspector/config @graphql-inspector/cli graphql
- uses: actions/upload-artifact@v3
with:
name: schema.graphql
path: /tmp/schema.graphql

- name: Run Schema Inspector
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Test Plugin

on:
workflow_call:
pull_request:
paths-ignore:
- '**/*.md'
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/upload-schema-artifact.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Upload Schema Artifact

on:
workflow_run:
workflows: ["Release"]
types:
- completed
release:
types: [ published ]

jobs:
run:
Expand Down

0 comments on commit 1415e91

Please sign in to comment.