Upgrade to use asherah-cobhan v0.4.35 #143
Workflow file for this run
This file contains hidden or 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: Build | |
on: | |
pull_request: | |
branches: | |
- "*" | |
push: | |
branches: | |
- main | |
jobs: | |
specs: | |
runs-on: ${{ matrix.os }} | |
name: specs ruby-${{ matrix.ruby }} ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-22.04, macos-15 ] | |
ruby: [ 2.7, 3.0, 3.1, 3.2 ] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler: default | |
bundler-cache: true | |
- name: Run specs | |
run: | | |
COVERAGE=true bundle exec rake spec | |
- name: Run rubocop | |
run: | | |
bundle exec rubocop | |
smoke: | |
runs-on: ${{ matrix.os }} | |
name: smoke ruby-${{ matrix.ruby }} ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- { os: ubuntu-22.04 , platform: x86_64-linux , ruby: 3.0 } | |
- { os: macos-15 , platform: x86_64-darwin , ruby: 3.0 } | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler: default | |
bundler-cache: true | |
- name: Smoke test gem | |
run: | | |
bundle exec rake build | |
gem install pkg/asherah-$(bundle exec rake version).gem | |
ruby spec/smoke_test.rb # Don't use `bundle exec` to load the installed gem. | |
gem uninstall asherah | |
- name: Smoke test platform gem | |
run: | | |
bundle exec rake native:build:${{ matrix.platform }} | |
gem install pkg/asherah-$(bundle exec rake version)-${{ matrix.platform }}.gem | |
ruby spec/smoke_test.rb # Don't use `bundle exec` to load the installed gem. | |
gem uninstall asherah | |
smoke_arm64: | |
runs-on: ${{ matrix.os }} | |
name: smoke arm32 ruby-${{ matrix.ruby }} ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- { os: ubuntu-22.04 , platform: aarch64-linux , ruby: 3.0 } | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler: default | |
bundler-cache: true | |
- name: Smoke test gems | |
run: | | |
bundle exec rake build | |
bundle exec rake native:build:${{ matrix.platform }} | |
GEM_NAME=asherah-$(bundle exec rake version).gem | |
GEM_PLATFORM_NAME=asherah-$(bundle exec rake version)-${{ matrix.platform }}.gem | |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
docker run --rm --volume "$(pwd):/asherah" \ | |
--platform linux/arm64/v8 \ | |
--workdir /asherah \ | |
ruby:${{matrix.ruby}}-bullseye \ | |
/bin/sh -c " | |
gem install pkg/$GEM_NAME | |
ruby spec/smoke_test.rb | |
gem uninstall asherah | |
gem install pkg/$GEM_PLATFORM_NAME | |
ruby spec/smoke_test.rb | |
gem uninstall asherah | |
" | |
cross_language_tests: | |
runs-on: ubuntu-22.04 | |
name: cross-language-tests | |
env: | |
MYSQL_HOSTNAME: 127.0.0.1 | |
MYSQL_DATABASE: testdb | |
MYSQL_USERNAME: root | |
MYSQL_PASSWORD: password | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_DATABASE: ${{ env.MYSQL_DATABASE }} | |
MYSQL_ROOT_PASSWORD: ${{ env.MYSQL_PASSWORD }} | |
ports: | |
- 3306:3306 | |
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 10 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2 | |
bundler: default | |
bundler-cache: true | |
- name: Download binary for current platform | |
run: | | |
bundle exec rake download | |
- name: Initialize RDBMS metastore | |
run: | | |
mysql -h ${{ env.MYSQL_HOSTNAME }} -P${{ job.services.mysql.ports[3306] }} -u ${{ env.MYSQL_USERNAME }} -p${{ env.MYSQL_PASSWORD }} -e "CREATE TABLE ${{ env.MYSQL_DATABASE }}.encryption_key ( | |
id VARCHAR(255) NOT NULL, | |
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
key_record TEXT NOT NULL, | |
PRIMARY KEY (id, created), | |
INDEX (created) | |
);" | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version: 1.23 | |
- name: Test Cross-Language | |
env: | |
TEST_DB_NAME: ${{ env.MYSQL_DATABASE }} | |
TEST_DB_PASSWORD: ${{ env.MYSQL_PASSWORD }} | |
TEST_DB_HOSTNAME: ${{ env.MYSQL_HOSTNAME }} | |
TEST_DB_USER: ${{ env.MYSQL_USERNAME }} | |
TEST_DB_PORT: ${{ job.services.mysql.ports[3306] }} | |
ASHERAH_SERVICE_NAME: service | |
ASHERAH_PRODUCT_NAME: product | |
ASHERAH_KMS_MODE: static | |
CUCUMBER_PUBLISH_QUIET: true | |
run: bin/cross-language-test.sh |