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

test: implement test using Kitchen and Inspec, and CI with Travis #52

Merged
merged 2 commits into from
Oct 29, 2019

Conversation

daks
Copy link
Member

@daks daks commented Oct 25, 2019

What type of PR is this?

Implement semantic-release and a limited set of Kitchen/Inspec tests on some platforms.

Primary type

  • [build] Changes related to the build system
  • [chore] Changes to the build process or auxiliary tools and libraries such as documentation generation
  • [ci] Changes to the continuous integration configuration
  • [feat] A new feature
  • [fix] A bug fix
  • [perf] A code change that improves performance
  • [refactor] A code change that neither fixes a bug nor adds a feature
  • [revert] A change used to revert a previous commit
  • [style] Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)

Secondary type

  • [docs] Documentation changes
  • [test] Adding missing or correcting existing tests

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Describe the changes you're proposing

Pillar / config required to test the proposed changes

Debug log showing how the proposed changes work

Documentation checklist

  • Updated the README (e.g. Available states).
  • Updated pillar.example.

Testing checklist

  • Included in Kitchen (i.e. under state_top).
  • Covered by new/existing tests (e.g. InSpec, Serverspec, etc.).
  • Updated the relevant test pillar.

Additional context

Formula working on a limited set of platforms. First version of semantic-release implementation. Tests pass on working platforms.

Copy link
Member

@myii myii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR, @daks. For the first part of the review, there's just some files which need to be added direct from the template-formula:

  1. .rubocop.yml
  2. .salt-lint
  3. .yamllint
  4. release-rules.js

And one that needs to be removed:

  1. docs/CONTRIBUTING_DOCS.rst

With these done, only yamllint errors need to be resolved:

rabbitmq-formula$ yamllint -s .
./pillar.example
  1:1       warning  missing document start "---"  (document-start)
  2:1       warning  comment not indented like content  (comments-indentation)
  3:12      warning  truthy value should be one of [false, true]  (truthy)
  4:12      warning  truthy value should be one of [false, true]  (truthy)
  18:16     warning  truthy value should be one of [false, true]  (truthy)
  21:9      error    wrong indentation: expected 10 but found 8  (indentation)
  22:11     error    wrong indentation: expected 12 but found 10  (indentation)
  28:16     warning  truthy value should be one of [false, true]  (truthy)
  31:9      error    wrong indentation: expected 10 but found 8  (indentation)
  32:11     error    wrong indentation: expected 12 but found 10  (indentation)
  47:8      warning  missing starting space in comment  (comments)
  50:1      error    syntax error: could not find expected ':'

After that, it's just a matter of arranging the platforms for testing, with some changes to kitchen.yml (for the new platforms that are supported) and .travis.yml. These are pretty good examples to base that upon:

@daks daks force-pushed the semantic-release branch 4 times, most recently from 2efc614 to 8a09a13 Compare October 28, 2019 12:17
@daks
Copy link
Member Author

daks commented Oct 28, 2019

@myii I added missing files, fixed lint errors, but I'm not sure what to do with the testing matrix, I already took the one from template-formula.

@daks daks force-pushed the semantic-release branch 2 times, most recently from 804232e to 00d1974 Compare October 29, 2019 12:06
@daks daks force-pushed the semantic-release branch from 00d1974 to e9eb8ff Compare October 29, 2019 12:06
@daks
Copy link
Member Author

daks commented Oct 29, 2019

@myii I updated files from template-formula and also FORMULA to only include Debian and Ubuntu as, for now, those are the only platforms supported.

Feel free to comment if needed, or merge it, as I think it's OK now.

@myii
Copy link
Member

myii commented Oct 29, 2019

@daks I'll have a look at this within the next day. If there are only minor issues (such as .travis.yml needing updating, as it appears it does), then I'll just append a commit and get this merged.


Actually, since the new pre-salted images are effectively available now, I'll probably include those in the commit as well.

@myii
Copy link
Member

myii commented Oct 29, 2019

@daks I've added 2b5e400, would you care to check it before this is merged?

@myii myii merged commit 0f5acce into saltstack-formulas:master Oct 29, 2019
@myii
Copy link
Member

myii commented Oct 29, 2019

Thanks for the confirmation on Slack, @daks -- merged.

@saltstack-formulas-travis

🎉 This PR is included in version 0.15.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

myii added a commit to myii/ssf-formula that referenced this pull request Oct 31, 2019
@daks daks deleted the semantic-release branch April 7, 2022 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants