Skip to content

Commit

Permalink
Merge pull request #2970 from alphagov/bulk/add-github-actions-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
theseanything authored Jan 3, 2023
2 parents 7febf9f + f0dfff2 commit cc86995
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 15 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/ci.yaml

This file was deleted.

65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI

on:
workflow_dispatch: {}
push:
branches:
- main
paths-ignore:
- "Jenkinsfile"
- ".git**"
pull_request:

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

lint-scss:
name: Lint SCSS
uses: alphagov/govuk-infrastructure/.github/workflows/stylelint.yml@main
with:
files: "app/assets/stylesheets/"

lint-javascript:
name: Lint JavaScript
uses: alphagov/govuk-infrastructure/.github/workflows/standardx.yml@main
with:
files: "'app/assets/javascripts/**/*.js' 'spec/javascripts/**/*.js'"

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

test-javascript:
name: Test JavaScript
uses: alphagov/govuk-infrastructure/.github/workflows/jasmine.yml@main
with:
useWithRails: true

test-ruby:
name: Test Ruby
runs-on: ubuntu-latest
steps:
- name: Setup Redis
uses: alphagov/govuk-infrastructure/.github/actions/setup-redis@main

- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Setup Node
uses: alphagov/govuk-infrastructure/.github/actions/setup-node@main

- name: Precompile assets
uses: alphagov/govuk-infrastructure/.github/actions/precompile-rails-assets@main

- name: Run Minitest
env:
RAILS_ENV: test
run: bundle exec rake test

0 comments on commit cc86995

Please sign in to comment.