Merge pull request #1803 from unboxed/fix-eia-status-tags #12897
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
linters: | |
name: Linters | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
task: | |
- brakeman | |
- rubocop | |
- biome | |
- erblint | |
- language_versions | |
fail-fast: false | |
env: | |
BUNDLE_WITHOUT: development | |
PUPPETEER_SKIP_DOWNLOAD: true | |
RAILS_ENV: test | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Ruby and install gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Install Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .node-version | |
- run: yarn install | |
- name: Lint with ${{ matrix.task }} | |
run: | | |
bundle exec rake ${{ matrix.task }} | |
specs: | |
uses: ./.github/workflows/testing.yml | |
strategy: | |
matrix: | |
specs: | |
- { group: "models", pattern: "[a-p]*_spec.rb" } | |
- { group: "models", pattern: "[q-z]*_spec.rb" } | |
- { group: "controllers", pattern: "*_spec.rb" } | |
- { group: "requests", pattern: "*_spec.rb", want_pdf: true } | |
- { group: "system", pattern: "a[a-f]*_spec.rb", want_pdf: true } | |
- { group: "system", pattern: "a[g-s]*_spec.rb", want_pdf: true } | |
- { group: "system", pattern: "a[t-z]*_spec.rb" } | |
- { group: "system", pattern: "[b-c]*_spec.rb", want_pdf: true } | |
- { group: "system", pattern: "[d-f]*_spec.rb", want_pdf: true } | |
- { group: "system", pattern: "[g-k]*_spec.rb" } | |
- { group: "system", pattern: "[l-m]*_spec.rb" } | |
- { group: "system", pattern: "[n-p]*_spec.rb" } | |
- { group: "system", pattern: "[q-r]*_spec.rb" } | |
- { group: "system", pattern: "[s-t]*_spec.rb" } | |
- { group: "system", pattern: "[u-z]*_spec.rb" } | |
- { | |
group: "other", | |
pattern: "*_spec.rb", | |
directories: "{components,form_models,helpers,presenters,mailer,jobs,services,translations}", | |
} | |
- { group: "bops_admin", pattern: "*_spec.rb", module: "engines" } | |
- { group: "bops_api", pattern: "*_spec.rb", module: "engines" } | |
- { group: "bops_config", pattern: "*_spec.rb", module: "engines" } | |
- { group: "bops_core", pattern: "*_spec.rb", module: "engines" } | |
fail-fast: false | |
with: | |
name: "${{matrix.specs.group}}: ${{matrix.specs.pattern }}" | |
include: "${{matrix.specs.module || 'spec'}}/${{matrix.specs.directories || matrix.specs.group}}/**/${{matrix.specs.pattern}}" | |
want-pdf: "${{ !!matrix.specs.want_pdf }}" | |
secrets: inherit | |
cucumber: | |
uses: ./.github/workflows/testing.yml | |
with: | |
name: "all" | |
test-runner: "cucumber" | |
want-pdf: true | |
secrets: inherit | |
docker-dnsmasq: | |
uses: ./.github/workflows/testing.yml | |
with: | |
name: "all" | |
test-runner: "docker" | |
dockerfile: docker/dnsmasq/Dockerfile | |
context: docker/dnsmasq | |
secrets: inherit | |
docker-postgis: | |
uses: ./.github/workflows/testing.yml | |
with: | |
name: "all" | |
test-runner: "docker" | |
dockerfile: docker/postgis/Dockerfile | |
context: docker/postgis | |
secrets: inherit | |
docker-ruby: | |
uses: ./.github/workflows/testing.yml | |
with: | |
name: "all" | |
test-runner: "docker" | |
dockerfile: docker/ruby/Dockerfile | |
context: docker/ruby | |
secrets: inherit | |
docker-prod: | |
uses: ./.github/workflows/testing.yml | |
with: | |
name: "all" | |
test-runner: "docker" | |
dockerfile: Dockerfile.production | |
secrets: inherit |