-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BAM: Updated gempush.yml to run tests and linting on PRs (#567)
* BAM: Updated gempush.yml to run tests and linting on PRs * BAM: Updated list of events to run workflow on * BAM: Moving tests and linting to it's own workflow to run on master and PRs * Trigger Build * Adjust workflow name, add back tests to primary workflow * Restrict permissions on linting workflow * Trigger Build * BAM: Attempting to call a workflow from a workflow * BAM: Fix needs statement * BAM: Adding to tests-linting * BAM: Removing requirement for secrets Co-authored-by: Kevin Formsma <kevin.formsma@gmail.com>
- Loading branch information
1 parent
1893b15
commit f4b78de
Showing
2 changed files
with
58 additions
and
41 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: test-lint | ||
|
||
on: | ||
workflow_call: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
docker_org: stelligent | ||
|
||
jobs: | ||
tests-linting: | ||
name: Tests & Linting | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false # Allows both ruby versions to run before failing | ||
matrix: | ||
ruby: ['2.5', '3.0'] | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- name: Rubocop lint | ||
run: bundle exec rubocop -D | ||
- name: Rspec tests | ||
run: bundle exec rspec --require spec_helper spec | ||
- name: Duplicate rule check | ||
run: bundle exec ./bin/cfn_nag_rules | ||
|
||
acceptance: | ||
name: Acceptance | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false # Allows both ruby versions to run before failing | ||
matrix: | ||
ruby: ['2.5', '3.0'] | ||
|
||
steps: | ||
# is this the same commit hash we saw in commit? | ||
- uses: actions/checkout@master | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
- name: e2e | ||
run: bash ./scripts/setup_and_run_end_to_end_tests.sh |