Add lint and test action #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint and Test | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.6 | |
- name: Install dependencies | |
run: | | |
bundle install --jobs 4 --retry 3 | |
- name: Lint with Rubocop | |
run: | | |
bundle exec rubocop --parallel | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
node-version: 2.1 | |
- name: Install dependencies | |
run: | | |
bundle install --jobs 4 --retry 3 | |
- name: Test octofacts | |
run: | | |
bundle exec rake octofacts:spec:octofacts | |
- name: Test octofacts_updater | |
run: | | |
bundle exec rake octofacts:spec:octofacts_updater |