|
| 1 | +name: Main |
| 2 | +on: [push, pull_request] |
| 3 | +jobs: |
| 4 | + ruby-lint: |
| 5 | + runs-on: ubuntu-latest |
| 6 | + env: |
| 7 | + BUNDLE_APP_CONFIG: .bundle |
| 8 | + steps: |
| 9 | + - uses: actions/checkout@v4 |
| 10 | + - uses: ruby/setup-ruby@v1 |
| 11 | + with: |
| 12 | + ruby-version: '3.2' |
| 13 | + bundler-cache: true |
| 14 | + - run: bundle exec rubocop |
| 15 | + ruby-test: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + env: |
| 18 | + BUNDLE_APP_CONFIG: .bundle |
| 19 | + strategy: |
| 20 | + fail-fast: false |
| 21 | + matrix: |
| 22 | + appraisal: ['graphql-1.10', 'graphql-1.11', 'graphql-1.12', 'graphql-1.13', 'graphql-2.0'] |
| 23 | + ruby: ['2.7', '3.0', '3.1', '3.2'] |
| 24 | + exclude: |
| 25 | + - appraisal: 'graphql-1.10' |
| 26 | + ruby: '3.2' |
| 27 | + - appraisal: 'graphql-1.11' |
| 28 | + ruby: '3.2' |
| 29 | + - appraisal: 'graphql-1.12' |
| 30 | + ruby: '3.2' |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v4 |
| 33 | + - uses: ruby/setup-ruby@v1 |
| 34 | + with: |
| 35 | + ruby-version: ${{ matrix.ruby }} |
| 36 | + bundler-cache: true |
| 37 | + - uses: ./.github/actions/appraisal-install |
| 38 | + with: |
| 39 | + appraisal: ${{ matrix.appraisal }} |
| 40 | + - run: bundle config list |
| 41 | + - run: bundle exec appraisal ${{ matrix.appraisal }} bundle config list |
| 42 | + - run: bundle exec appraisal ${{ matrix.appraisal }} rake |
| 43 | + |
| 44 | + integration-tests: |
| 45 | + runs-on: ubuntu-latest |
| 46 | + env: |
| 47 | + BUNDLE_APP_CONFIG: .bundle |
| 48 | + strategy: |
| 49 | + fail-fast: false |
| 50 | + matrix: |
| 51 | + appraisal: ['graphql-1.10', 'graphql-1.11', 'graphql-1.12', 'graphql-1.13', 'graphql-2.0'] |
| 52 | + ruby: ['2.7', '3.0', '3.1', '3.2'] |
| 53 | + exclude: |
| 54 | + - appraisal: 'graphql-1.10' |
| 55 | + ruby: '3.2' |
| 56 | + - appraisal: 'graphql-1.11' |
| 57 | + ruby: '3.2' |
| 58 | + - appraisal: 'graphql-1.12' |
| 59 | + ruby: '3.2' |
| 60 | + steps: |
| 61 | + - uses: actions/checkout@v4 |
| 62 | + - uses: ruby/setup-ruby@v1 |
| 63 | + with: |
| 64 | + ruby-version: ${{ matrix.ruby }} |
| 65 | + bundler-cache: true |
| 66 | + - uses: ./.github/actions/appraisal-install |
| 67 | + with: |
| 68 | + appraisal: ${{ matrix.appraisal }} |
| 69 | + - name: Run install |
| 70 | + uses: borales/actions-yarn@v4 |
| 71 | + with: |
| 72 | + cmd: install |
| 73 | + - run: bundle exec appraisal ${{ matrix.appraisal }} yarn test |
| 74 | + - run: yarn lint |
| 75 | + |
| 76 | + release: |
| 77 | + runs-on: ubuntu-latest |
| 78 | + needs: [ruby-lint, ruby-test, integration-tests] |
| 79 | + env: |
| 80 | + BUNDLE_APP_CONFIG: .bundle |
| 81 | + steps: |
| 82 | + - uses: actions/checkout@v4 |
| 83 | + - uses: ruby/setup-ruby@v1 |
| 84 | + with: |
| 85 | + ruby-version: '3.2' |
| 86 | + bundler-cache: true |
| 87 | + - name: Run install |
| 88 | + uses: borales/actions-yarn@v4 |
| 89 | + with: |
| 90 | + cmd: install |
| 91 | + - run: npx semantic-release |
0 commit comments