From ef45fe8c756190e1770d35a61700b7ce11f84a15 Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Mon, 1 Jul 2024 23:29:34 -0700 Subject: [PATCH] test ruby in cicd --- .github/workflows/ci.yml | 45 +++++++++++++++++++++++++++++++++++--- .github/workflows/ruby.yml | 37 ------------------------------- 2 files changed, 42 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/ruby.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eeed1e06..370bdec6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Cargo Build & Test +name: Test on: push: @@ -8,8 +8,8 @@ env: CARGO_TERM_COLOR: always jobs: - build_and_test: - name: Build & Test + cargo_build_and_test: + name: Cargo Build & Test runs-on: ubuntu-latest strategy: matrix: @@ -22,3 +22,42 @@ jobs: - run: cargo build --verbose - run: cargo test --verbose - run: cargo doc --verbose + + + ruby_test: + runs-on: ${{ matrix.os }}-latest + strategy: + fail-fast: false + matrix: + os: [ubuntu, macos] + ruby: [3.0, 3.1, 3.2] + + defaults: + run: + working-directory: ruby-sdk + + env: + EPPO_API_KEY: ${{ secrets.EPPO_API_KEY }} + + steps: + - uses: actions/checkout@v4 + + - name: Set up Ruby & Rust + uses: oxidize-rb/actions/setup-ruby-and-rust@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + cargo-cache: true + rubygems: '3.5.11' + + - name: Install dependencies + run: bundle install + + - name: Build + run: bundle exec rake build + + - name: Load test data + run: bundle exec rake test_refreshed_data + + - name: Run tests + run: bundle exec rspec diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml deleted file mode 100644 index cc2535a4..00000000 --- a/.github/workflows/ruby.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Ruby - -on: - push: - branches: - - main - - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - name: Ruby ${{ matrix.ruby }} - strategy: - matrix: - ruby: - - '3.3.2' - - defaults: - run: - working-directory: ruby-sdk - - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby & Rust - uses: oxidize-rb/actions/setup-ruby-and-rust@v1 - with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true - cargo-cache: true - rubygems: '3.5.11' - - name: Install dependencies - run: bundle install - - name: Run the default task - env: - EPPO_API_KEY: ${{ secrets.EPPO_API_KEY }} - run: bundle exec rake