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: |