hub icon indicating copy to clipboard operation
hub copied to clipboard

feat: add a devcontainer for easier development

Open sdwilsh opened this issue 10 months ago • 1 comments

This change adds a devcontainer that properly sets up a test environment such that a user has a working cscli and crowdsec command for their hub checkout. This makes it much easier to developer parsers in this repository, greatly reducing the barrier to entry.

This change also adds a workflow to make sure the devcontainer can build. This could be further extended to also run tests in the devcontainer.

I verified this works by running the example test command in the README.md:

cscli hubtest run dovecot-logs
INFO[26-02-2025 19:00:00] Running test 'dovecot-logs'                  
INFO[26-02-2025 19:00:03] Test 'dovecot-logs' passed successfully (387 assertions) 
───────────────────────
 Test           Result 
───────────────────────
 dovecot-logs   ✅     
───────────────────────

Additionally, I ran all tests with cscli hubtest run --all, which outputted this: https://gist.github.com/sdwilsh/6ed59b6904dac9cabbea63c55567c070

sdwilsh avatar Feb 26 '25 19:02 sdwilsh

Anything I can do to help get this merged in? I'm happy to answer questions, etc.

sdwilsh avatar Mar 19 '25 01:03 sdwilsh