Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable unit tests on CI #32

Merged
merged 1 commit into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 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,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
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)
rwaffen marked this conversation as resolved.
Show resolved Hide resolved
end
server_thread.join(1)

Expand Down