From 4b733ad7fcfc3b6b9f4d5157b0b4e54ec2767fcf Mon Sep 17 00:00:00 2001 From: Oleh Fedorenko Date: Fri, 4 Aug 2023 17:09:37 +0200 Subject: [PATCH] Add GA to run tests on Ruby 3+ (#617) --- .github/workflows/unit_tests.yaml | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/unit_tests.yaml diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml new file mode 100644 index 000000000..71e036eae --- /dev/null +++ b/.github/workflows/unit_tests.yaml @@ -0,0 +1,42 @@ +name: Run tests GA + +on: + - push + - pull_request + +jobs: + test: + runs-on: ubuntu-latest + defaults: + run: + working-directory: hammer-cli-foreman + strategy: + fail-fast: false + matrix: + ruby: + - 2.7 + - 3.0 + - 3.1 + steps: + - name: Get hammer-cli + uses: actions/checkout@v2 + with: + repository: theforeman/hammer-cli + ref: master + path: hammer-cli + - name: Get hammer-cli-foreman + uses: actions/checkout@v2 + with: + path: hammer-cli-foreman + - name: Configure local gem dependencies + run: | + echo "gemspec path: '../hammer-cli', name: 'hammer_cli'" > Gemfile.local.rb + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + working-directory: hammer-cli-foreman + - name: Run tests + run: | + bundle exec rake test