diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 41337e5e..13c6366a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,7 +20,6 @@ jobs: runs-on: ubuntu-latest env: BUNDLE_WITHOUT: development:test - steps: - uses: actions/checkout@v2 - name: Set up Ruby @@ -29,3 +28,24 @@ jobs: bundler-cache: true - name: Run tests run: bundle exec rake rubocop + unit_tests: + name: Unit tests + runs-on: ubuntu-latest + env: + COVERAGE: true + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - name: Setup config + run: mv config/hdm.yml{.template,} + - name: Install webpacker + run: bundle exec rake webpacker:install + - name: Generate assets + run: bundle exec rake webpacker:compile + - name: Verify assets + run: bundle exec rake webpacker:verify_install + - name: Run tests + run: bundle exec rake test:all diff --git a/config/hdm.yml.template b/config/hdm.yml.template index cdaac28c..cc1563f8 100644 --- a/config/hdm.yml.template +++ b/config/hdm.yml.template @@ -10,7 +10,7 @@ test: read_only: false allow_encryption: true puppet_db: - server: "http://localhost:8084" + server: "http://localhost:8085" config_dir: <%= Rails.root.join('test','fixtures','files','puppet') %> #hiera_config_file: "hiera_hdm.yaml" diff --git a/test/test_helper.rb b/test/test_helper.rb index 00edb049..76ff700d 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -13,7 +13,7 @@ # Start FakePuppetDB-Server server_thread = Thread.new do - Rack::Server.start(app: FakePuppetDB.new, Host: "localhost", Port: 8084) + Rack::Server.start(app: FakePuppetDB.new, Host: "localhost", Port: 8085) end server_thread.join(1)