Skip to content

Support 3.3.0

Support 3.3.0 #169

Workflow file for this run

name: Test
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on: pull_request
jobs:
cargo_test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3"
- uses: Swatinem/rust-cache@v2
- run: cargo test --workspace
generate-example-matrix:
runs-on: ubuntu-latest
outputs:
examples: ${{ steps.set-matrix.outputs.examples }}
steps:
- uses: actions/checkout@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3"
- name: make values
id: set-matrix
run: |
cat <<CODE | ruby >> $GITHUB_OUTPUT
require 'json'
puts "examples=#{JSON.generate(Dir.glob('examples/*'))}"
CODE
examples:
name: run specs on examples
runs-on: ubuntu-latest
needs: generate-example-matrix
strategy:
fail-fast: false
matrix:
example: ${{ fromJson(needs.generate-example-matrix.outputs.examples) }}
steps:
- uses: actions/checkout@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3"
- run: rake test
working-directory: ${{ matrix.example }}
minutus-mrbgem-template:
name: run spec on minutus-mrbgem-template
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
script:
- ./test.sh
- ./test_with_dependency.sh
steps:
- uses: actions/checkout@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3"
- run: cargo clean && ${{ matrix.script }}
working-directory: minutus-mrbgem-template
aggregated-ci:
runs-on: ubuntu-latest
needs: [cargo_test, minutus-mrbgem-template, examples]
if: always()
steps:
- name: All tests ok
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Some tests failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1