Sha256: 076df72cbf28f8257a01a6203dde200ab65fe61da79fd1e110ca66aabcdb398e

Contents?: true

Size: 1.51 KB

Versions: 1

Compression:

Stored size: 1.51 KB

Contents

name: CI

on: [push, pull_request]

jobs:  
  # This matrix job runs the test suite against multiple Ruby versions
  test_matrix:
    strategy:
      fail-fast: false
      matrix:
        ruby: [3.2, 3.3]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Clone content-schemas
        uses: actions/checkout@v4
        with:
          repository: publishing-platform/publishing-api
          ref: main
          path: tmp/publishing-api 
          token: ${{ secrets.PUBLISHING_PLATFORM_CI_GITHUB_API_TOKEN }}     
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - run: bundle exec rake
        env:
          PUBLISHING_PLATFORM_CONTENT_SCHEMAS_PATH: tmp/publishing-api/content_schemas      

  # Branch protection rules cannot directly depend on status checks from matrix jobs.
  # So instead we define `test` as a dummy job which only runs after the preceding `test_matrix` checks have passed.
  # Solution inspired by: https://github.community/t/status-check-for-a-matrix-jobs/127354/3
  test:
    needs: test_matrix
    runs-on: ubuntu-latest
    steps:
      - run: echo "All matrix tests have passed 🚀"

  publish:
    needs: test
    if: ${{ github.ref == 'refs/heads/main' }}
    permissions:
      contents: write
    uses: publishing-platform/publishing-platform-infrastructure/.github/workflows/publish-rubygem.yml@main
    secrets:
      GEM_HOST_API_KEY: ${{ secrets.PUBLISHING_PLATFORM_RUBYGEMS_API_KEY }}      

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
publishing_platform_schemas-0.1.1 .github/workflows/ci.yml