-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (36 loc) · 1.17 KB
/
ci.yml
File metadata and controls
44 lines (36 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CI
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
jobs:
ci:
name: CI
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.4', '3.3', '3.2']
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Ruby
uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Bundle install
run: |
gem install bundler
bundle install --jobs 4 --retry 3
- name: Run tests
run: bundle exec rake test
- name: Verify schema is up-to-date
run: |
bundle exec rake graphql:update_schema
git diff --exit-code
exit $?
- name: Validate GraphQL queries
run: |
export EXITCODE=$(grep -E '^(mutation|query) [a-z]' lib/queries.graphql || echo $?)
if [[ $EXITCODE -eq 0 ]]; then
echo "Failed to validate GraphQL queries."
echo "Ensure that GraphQL named queries are in TitleCase"
exit 1
fi