From 37898316372db75a79dd57f05fae8f9795ae7688 Mon Sep 17 00:00:00 2001 From: Markus Bucher Date: Wed, 20 Dec 2023 16:45:07 +0100 Subject: [PATCH] WIP: fix unit tests --- .github/workflows/unit_tests.yml | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index ce04e550..bf0d929a 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -24,7 +24,7 @@ jobs: fail-fast: false matrix: foreman-repo: [theforeman/foreman] - foreman-core-branch: [3.3-stable, 3.4-stable, develop] + foreman-core-branch: [3.8-stable, 3.9-stable, develop] ruby-version: [2.7] node: [14] steps: @@ -38,30 +38,16 @@ jobs: - uses: actions/checkout@v2 with: path: foreman_acd - - name: Setup Bundler + - name: Add ACD to foreman run: | echo "gem 'foreman_acd', path: './foreman_acd'" > bundler.d/foreman_acd.local.rb - name: Limit REX and tasks version for Foreman 3.3-stable working-directory: foreman_acd - if: ${{ matrix.foreman-core-branch == '3.3-stable' }} + if: ${{ matrix.foreman-core-branch == '3.8-stable' }} run: | - sed -i '23,24d' foreman_acd.gemspec - sed -i '23is.add_dependency "foreman-tasks", "~> 6.0"' foreman_acd.gemspec - sed -i '23is.add_dependency "foreman_remote_execution", "~> 7.2"' foreman_acd.gemspec - - name: Limit REX and tasks version for Foreman 3.4-stable - working-directory: foreman_acd - if: ${{ matrix.foreman-core-branch == '3.4-stable' }} - run: | - sed -i '23,24d' foreman_acd.gemspec - sed -i '23is.add_dependency "foreman-tasks", "~> 7.0"' foreman_acd.gemspec - sed -i '23is.add_dependency "foreman_remote_execution", "~> 8.0"' foreman_acd.gemspec - - name: Limit REX and tasks version for Foreman develop - working-directory: foreman_acd - if: ${{ matrix.foreman-core-branch == 'develop' }} - run: | - sed -i '23,24d' foreman_acd.gemspec - sed -i '23is.add_dependency "foreman-tasks", "~> 7.0"' foreman_acd.gemspec - sed -i '23is.add_dependency "foreman_remote_execution", "~> 9.0"' foreman_acd.gemspec + sed -i '/s\.add_dependency "foreman-tasks"/s/"[^"]*"$/"~> 8.3"/' foreman_acd.gemspec + sed -i '/s\.add_dependency "foreman_remote_execution"/s/"[^"]*"$/"~> 11.1"/' foreman_acd.gemspec + - name: Setup Ruby uses: ruby/setup-ruby@v1 with: @@ -71,6 +57,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} + cache: 'npm' - name: Prepare test env run: | bundle exec rake db:create @@ -78,7 +65,6 @@ jobs: bundle exec rake db:test:prepare - name: Prepare webpack run: | - npm install bundle exec rake webpack:compile - name: Run plugin tests run: |