Pinned ffi_compiler2 version to 2.0.1 #34
Workflow file for this run
This file contains 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: test-and-release | |
on: | |
push: | |
branches: [ main ] | |
tags: [ 'v*' ] | |
pull_request: | |
concurrency: | |
group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}' | |
cancel-in-progress: true | |
env: | |
BUNDLER_VER: 2.4.22 | |
# Forcing bundler version to ensure that it is consistent everywhere and | |
# does not cause bundler gem reinstalls | |
jobs: | |
prepare: | |
uses: metanorma/ci/.github/workflows/prepare-rake.yml@main | |
test: | |
name: Test on Ruby ${{ matrix.ruby.version }} ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
needs: prepare | |
if: needs.prepare.outputs.push-for-tag != 'true' | |
continue-on-error: ${{ matrix.ruby.experimental }} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
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 }} | |
runs-on: ${{ matrix.os }} | |
needs: prepare | |
if: needs.prepare.outputs.push-for-tag != 'true' | |
continue-on-error: ${{ matrix.ruby.experimental }} | |
strategy: | |
fail-fast: false | |
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@v4 | |
with: | |
path: "excavate" | |
- run: 'echo ''gem "excavate", path: "./excavate"'' > Gemfile.devel' | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby.version }} | |
rubygems: ${{ matrix.ruby.rubygems }} | |
bundler: ${{ env.BUNDLER_VER }} | |
bundler-cache: true | |
- run: bundle exec rake | |
release: | |
name: Release gem | |
needs: [ test, metanorma ] | |
runs-on: ubuntu-latest | |
if: contains(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cadwallion/publish-rubygems-action@master | |
env: | |
RUBYGEMS_API_KEY: ${{secrets.FONTIST_CI_RUBYGEMS_API_KEY}} |