Skip to content

Commit

Permalink
Used prepare-rake ci action
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Feb 11, 2024
1 parent ba62d7a commit 201e76a
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,62 +16,64 @@ env:
# does not cause bundler gem reinstalls

jobs:
prepare:
uses: metanorma/ci/.github/workflows/prepare-rake.yml@main

test:
name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
name: Test on Ruby ${{ matrix.ruby.version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: false

needs: prepare
if: needs.prepare.outputs.push-for-tag != 'true'

continue-on-error: ${{ matrix.ruby.experimental }}
strategy:
fail-fast: false
matrix:
ruby: [ '2.7', '3.0', '3.1', '3.2' ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
max-parallel: 5
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}

steps:
- uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
ruby-version: ${{ matrix.ruby.version }}
rubygems: ${{ matrix.ruby.rubygems }}
bundler: ${{ env.BUNDLER_VER }}
bundler-cache: true

- run: bundle exec rspec

metanorma:
name: Test with Metanorma on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
name: Test with Metanorma on Ruby ${{ matrix.ruby.version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: false

needs: prepare
if: needs.prepare.outputs.push-for-tag != 'true'

continue-on-error: ${{ matrix.ruby.experimental }}

strategy:
fail-fast: false
matrix:
ruby: [ '2.7', '3.0', '3.1', '3.2' ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}

steps:
- uses: actions/checkout@v4
with:
repository: metanorma/metanorma

- uses: metanorma/metanorma-build-scripts/inkscape-setup-action@main

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: "excavate"

- run: 'echo ''gem "excavate", path: "./excavate"'' > Gemfile.devel'

# https://github.com/rubygems/rubygems/issues/5160
- if: matrix.ruby == '3.0'
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
bundler: ${{ env.BUNDLER_VER }}
rubygems: latest

- if: matrix.ruby != '3.0'
uses: ruby/setup-ruby@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
ruby-version: ${{ matrix.ruby.version }}
rubygems: ${{ matrix.ruby.rubygems }}
bundler: ${{ env.BUNDLER_VER }}
bundler-cache: true

Expand All @@ -83,7 +85,7 @@ jobs:
runs-on: ubuntu-latest
if: contains(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: cadwallion/publish-rubygems-action@master
env:
Expand Down

0 comments on commit 201e76a

Please sign in to comment.