forked from Gusto/apollo-federation-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (98 loc) · 2.79 KB
/
ci.yml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Main
on:
push:
branches:
- main
pull_request:
jobs:
ruby-lint:
runs-on: ubuntu-latest
env:
BUNDLE_APP_CONFIG: .bundle
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- run: bundle exec rubocop
ruby-test:
runs-on: ubuntu-latest
env:
BUNDLE_APP_CONFIG: .bundle
strategy:
fail-fast: false
matrix:
appraisal: [ 'graphql-1.10', 'graphql-1.11', 'graphql-1.12', 'graphql-1.13', 'graphql-2.0' ]
ruby: [ '3.0', '3.1', '3.2' ]
exclude:
- appraisal: 'graphql-1.10'
ruby: '3.2'
- appraisal: 'graphql-1.11'
ruby: '3.2'
- appraisal: 'graphql-1.12'
ruby: '3.2'
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run appraisal install
uses: ./.github/actions/appraisal-install
with:
appraisal: ${{ matrix.appraisal }}
- run: bundle config list
- run: bundle exec appraisal ${{ matrix.appraisal }} bundle config list
- run: bundle exec appraisal ${{ matrix.appraisal }} rake
integration-tests:
runs-on: ubuntu-latest
env:
BUNDLE_APP_CONFIG: .bundle
strategy:
fail-fast: false
matrix:
appraisal: [ 'graphql-1.10', 'graphql-1.11', 'graphql-1.12', 'graphql-1.13', 'graphql-2.0' ]
ruby: [ '3.0', '3.1', '3.2' ]
exclude:
- appraisal: 'graphql-1.10'
ruby: '3.2'
- appraisal: 'graphql-1.11'
ruby: '3.2'
- appraisal: 'graphql-1.12'
ruby: '3.2'
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run appraisal install
uses: ./.github/actions/appraisal-install
with:
appraisal: ${{ matrix.appraisal }}
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
- run: bundle exec appraisal ${{ matrix.appraisal }} yarn test
- run: yarn lint
release:
runs-on: ubuntu-latest
needs: [ ruby-lint, ruby-test, integration-tests ]
if: github.ref == 'refs/heads/main'
env:
BUNDLE_APP_CONFIG: .bundle
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
- run: npx semantic-release