This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Run a end to end test on the dummy gem" | |
| on: push | |
| jobs: | |
| get_versions: | |
| timeout-minutes: 10 | |
| name: "Get the ruby versions needed to compile" | |
| runs-on: ubuntu-latest | |
| outputs: | |
| latest_supported_ruby_version: ${{ steps.get_versions.outputs.latest_supported_ruby_version }} | |
| runtime_version_for_compilation: ${{ steps.get_versions.outputs.runtime_version_for_compilation }} | |
| ruby_versions_for_testing: ${{ steps.get_versions.outputs.ruby_versions_for_testing }} | |
| steps: | |
| - name: "Checkout code" | |
| uses: "actions/checkout@v5" | |
| - name: "Setup Ruby" | |
| uses: "ruby/setup-ruby@v1" | |
| with: | |
| ruby-version: "3.4.7" | |
| - name: "Run easy compile" | |
| id: get_versions | |
| uses: "./.github/actions/easy_compile" | |
| with: | |
| step: "get_versions" | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| working-directory: "test/fixtures/dummy_gem" | |
| compile: | |
| needs: get_versions | |
| timeout-minutes: 20 | |
| name: "Cross compile the gem on different ruby versions" | |
| strategy: | |
| matrix: | |
| os: ["ubuntu-latest"] | |
| runs-on: "${{ matrix.os }}" | |
| steps: | |
| - name: "Checkout code" | |
| uses: "actions/checkout@v5" | |
| - name: "Setup Ruby" | |
| uses: "ruby/setup-ruby@v1" | |
| with: | |
| ruby-version: ${{ needs.get_versions.outputs.runtime_version_for_compilation }} | |
| bundler-cache: true | |
| working-directory: "test/fixtures/dummy_gem" | |
| - name: "Run easy compile" | |
| uses: "./.github/actions/easy_compile" | |
| with: | |
| step: "compile" | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| working-directory: "test/fixtures/dummy_gem" | |
| test: | |
| needs: [get_versions, compile] | |
| timeout-minutes: 20 | |
| name: "Run the test suite" | |
| strategy: | |
| matrix: | |
| os: ["ubuntu-latest"] | |
| rubies: ${{ fromJSON(needs.get_versions.outputs.ruby_versions_for_testing) }} | |
| type: ["cross"] | |
| runs-on: "${{ matrix.os }}" | |
| steps: | |
| - name: "Checkout code" | |
| uses: "actions/checkout@v5" | |
| - name: "Setup Ruby" | |
| uses: "ruby/setup-ruby@v1" | |
| with: | |
| ruby-version: "${{ matrix.rubies }}" | |
| bundler-cache: true | |
| working-directory: "test/fixtures/dummy_gem" | |
| - name: "Run easy compile" | |
| uses: "./.github/actions/easy_compile" | |
| with: | |
| step: "test_${{ matrix.type }}" | |
| token: ${{ secrets.GITHUB_TOKEN }} # TODO Remove this before publishing the gem | |
| working-directory: "test/fixtures/dummy_gem" | |
| install: | |
| needs: [get_versions, compile, test] | |
| timeout-minutes: 5 | |
| name: "Verify the gem can be installed" | |
| strategy: | |
| matrix: | |
| os: ["ubuntu-latest"] | |
| runs-on: "${{ matrix.os }}" | |
| steps: | |
| - name: "Checkout code" | |
| uses: "actions/checkout@v5" | |
| - name: "Setup Ruby" | |
| uses: "ruby/setup-ruby@v1" | |
| with: | |
| ruby-version: ${{ needs.get_versions.outputs.latest_supported_ruby_version }} | |
| - name: "Run easy compile" | |
| uses: "./.github/actions/easy_compile" | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} # TODO Remove this before publishing the gem | |
| step: "install" |