Skip to content

Run tests as part of the workflow #61

Run tests as part of the workflow

Run tests as part of the workflow #61

Workflow file for this run

name: run-tests
on: [push]
jobs:
build_gem:
name: Build and test ruby extension
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: 3.1.0
- run: sudo apt-get update && sudo apt-get install -y libopencv-dev
- run: gem update --system
- run: rake gem
- run: gem install $(ls -1 pkg/*.gem)
- run: ruby tests/test_detection.rb
# compile_native_gem:
# name: Compile native gem
# runs-on: ubuntu-latest
# strategy:
# matrix:
# platform:
# - x86_64-linux
# - x86_64-darwin
# - arm64-darwin
# - aarch64-linux
# steps:
# - uses: actions/checkout@v2
# - uses: ruby/setup-ruby@v1
# with:
# ruby-version: '3.1'
# bundler-cache: true
# - uses: oxidize-rb/cross-gem-action@main
# with:
# platform: ${{ matrix.platform }}
# setup: | # optional
# env
# bundle install
# env: | # optional
# RUBY_CC_VERSION=3.1.0:3.0.0:2.7.0
# CXX_aarch64_unknown_linux_gnu=
# - uses: actions/download-artifact@v3
# with:
# name: cross-gem
# path: pkg/
# - name: Display structure of built gems
# run: ls -R
# working-directory: pkg/