Run tests as part of the workflow #60
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: 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 *.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/ |