Skip to content

Commit

Permalink
Enable unit tests on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Apr 7, 2022
1 parent 893c71a commit 07703f1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: development:test

steps:
- uses: actions/checkout@v2
- name: Set up Ruby
Expand All @@ -29,3 +28,22 @@ 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: Run tests
run: bundle exec rake test:all
2 changes: 1 addition & 1 deletion config/hdm.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 07703f1

Please sign in to comment.