Skip to content

Commit

Permalink
Improve CI Github Actions workflow
Browse files Browse the repository at this point in the history
- Give it the expected name ("CI") that downstream workflows expect
- Change default Rake task to only run specs (and remove custom Rubocop
  Rake task)
- Use `govuk-infrastructure` upstream workflows to run linting and
  Brakeman
  • Loading branch information
csutter committed Aug 31, 2023
1 parent c75d05d commit 0f03bf5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: CI

on:
push:
branches:
Expand All @@ -9,8 +11,18 @@ on:
description: 'The branch, tag or SHA to checkout'
default: main
type: string

jobs:
test:
lint-ruby:
name: Lint Ruby
uses: alphagov/govuk-infrastructure/.github/workflows/rubocop.yml@main

security-analysis:
name: Security Analysis
uses: alphagov/govuk-infrastructure/.github/workflows/brakeman.yml@main

test-ruby:
name: Test Ruby
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -20,4 +32,3 @@ jobs:
with:
bundler-cache: true
- run: bin/rake
- run: bundle exec brakeman
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ require_relative "config/application"

Rails.application.load_tasks

task default: %i[spec rubocop]
task default: %i[spec]
3 changes: 0 additions & 3 deletions lib/tasks/rubocop.rake

This file was deleted.

0 comments on commit 0f03bf5

Please sign in to comment.