Skip to content

Commit

Permalink
Merge pull request #3184 from archivesspace/ANW-2012-find-a-way-to-ma…
Browse files Browse the repository at this point in the history
…nually-initiate-running-on-Java-8

Manually trigger specs on CI
  • Loading branch information
brianzelip committed Apr 24, 2024
2 parents aaa5401 + 3bba267 commit 16a067a
Show file tree
Hide file tree
Showing 8 changed files with 189 additions and 41 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/accessibility.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
name: Accessibility Testing

on:
workflow_dispatch:
inputs:
java-version:
description: Java version to run specs on
required: true
type: choice
options:
- '8'
- '11'
default: '11'

workflow_call:
inputs:
java-version:
description: Java version to run specs on
required: true
type: string
default: '11'

pull_request:
paths:
- '.github/workflows/accessibility.yml'
Expand All @@ -9,14 +28,10 @@ on:

jobs:
accessibility:
name: Accessibility
name: Accessibility_Java_v${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"

strategy:
matrix:
java: [ 11 ]

services:
db:
image: mysql:8
Expand All @@ -39,7 +54,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
distribution: temurin

- uses: './.github/actions/bootstrap'
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/all_specs_dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Trigger all specs

on:
workflow_dispatch:
inputs:
java-version:
description: Java version to run specs on
required: true
type: choice
options:
- '8'
- '11'
default: '11'

jobs:
codescan:
uses: ./.github/workflows/codescan.yml
secrets: inherit
with:
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}

frontend:
uses: ./.github/workflows/frontend.yml
secrets: inherit
with:
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}

backend:
uses: ./.github/workflows/backend.yml
secrets: inherit
with:
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}

accessibility:
uses: ./.github/workflows/accessibility.yml
secrets: inherit
with:
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}

indexer:
uses: ./.github/workflows/indexer.yml
secrets: inherit
with:
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}

public:
uses: ./.github/workflows/public.yml
secrets: inherit
with:
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
27 changes: 21 additions & 6 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
name: Backend Testing

on:
workflow_dispatch:
inputs:
java-version:
description: Java version to run specs on
required: true
type: choice
options:
- '8'
- '11'
default: '11'

workflow_call:
inputs:
java-version:
description: Java version to run specs on
required: true
type: string
default: '11'

pull_request:
paths:
- '.github/workflows/backend.yml'
Expand All @@ -10,14 +29,10 @@ on:

jobs:
backend:
name: Backend
name: Backend_Java_v${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"

strategy:
matrix:
java: [ 11 ]

services:
db:
image: mysql:8
Expand All @@ -41,7 +56,7 @@ jobs:

- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
distribution: temurin

- uses: './.github/actions/bootstrap'
Expand Down
29 changes: 24 additions & 5 deletions .github/workflows/codescan.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,47 @@
name: Code Scan

on:
workflow_dispatch:
inputs:
java-version:
description: Java version to run specs on
required: true
type: choice
options:
- '8'
- '11'
default: '11'

workflow_call:
inputs:
java-version:
description: Java version to run specs on
required: true
type: string
default: '11'

pull_request:
branches:
- master

jobs:
rubocop:
name: Rubocop
name: Rubocop_Java_v${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
distribution: temurin

- name: Run rubocop
run: |
./build/run rubocop
eslint:
name: ESLint
name: ESLint_Java_v${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
runs-on: ubuntu-latest

steps:
Expand All @@ -35,7 +54,7 @@ jobs:
run: npm run eslint:ci

stylelint:
name: Stylelint
name: Stylelint_Java_v${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
runs-on: ubuntu-latest

steps:
Expand All @@ -48,7 +67,7 @@ jobs:
run: npm run stylelint:ci

prettier:
name: Prettier
name: Prettier_Java_v${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
runs-on: ubuntu-latest

steps:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/common-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
java-version:
required: true
type: string
default: 11

jobs:
start-runner:
Expand Down Expand Up @@ -73,9 +74,6 @@ jobs:
runs-on: ${{ needs.start-runner.outputs.label }}
if: "!contains(github.event.head_commit.message, '[ci skip]')"

strategy:
fail-fast: false

services:
db:
image: mysql:8
Expand All @@ -98,7 +96,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: ${{ inputs.java-version }}
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
distribution: temurin

- uses: './.github/actions/bootstrap'
Expand Down
35 changes: 29 additions & 6 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
name: Frontend Testing

on:
workflow_dispatch:
inputs:
java-version:
description: Java version to run specs on
required: true
type: choice
options:
- '8'
- '11'
default: '11'

workflow_call:
inputs:
java-version:
description: Java version to run specs on
required: true
type: string
default: '11'

pull_request:
paths:
- '.github/workflows/frontend.yml'
Expand All @@ -10,37 +29,41 @@ on:

jobs:
frontend_part_a:
name: part_a_Java_v${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
uses: ./.github/workflows/common-frontend.yml
secrets: inherit
with:
run-cmd: |
./build/run frontend:test -Dpattern="spec/features/[a-c]*_spec.rb"
name: part_a
java-version: 11
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}

frontend_part_b:
name: part_b_Java_v${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
uses: ./.github/workflows/common-frontend.yml
secrets: inherit
with:
run-cmd: |
./build/run frontend:test -Dpattern="spec/features/[d-j]*_spec.rb"
./build/run frontend:test -Dpattern="spec/features/[d-l]*_spec.rb"
name: part_b
java-version: 11
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}

frontend_part_c:
name: part_c_Java_v${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
uses: ./.github/workflows/common-frontend.yml
secrets: inherit
with:
run-cmd: |
./build/run frontend:test -Dpattern="spec/features/[k-r]*_spec.rb"
./build/run frontend:test -Dpattern="spec/features/[m-r]*_spec.rb"
name: part_c
java-version: 11
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}

frontend_part_d:
name: part_d_Java_v${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
uses: ./.github/workflows/common-frontend.yml
secrets: inherit
with:
run-cmd: |
./build/run frontend:test -Dpattern="spec/features/[s-z]*_spec.rb"
name: part_d
java-version: 11
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
27 changes: 21 additions & 6 deletions .github/workflows/indexer.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,41 @@
name: Indexer Testing

on:
workflow_dispatch:
inputs:
java-version:
description: Java version to run specs on
required: true
type: choice
options:
- '8'
- '11'
default: '11'

workflow_call:
inputs:
java-version:
description: Java version to run specs on
required: true
type: string
default: '11'

pull_request:
paths:
- '.github/workflows/indexer.yml'
- 'indexer/**'

jobs:
indexer:
name: indexer
name: indexer_Java_v${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"

strategy:
matrix:
java: [ 11 ]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
java-version: ${{ inputs.java-version || vars.DEFAULT_JAVA_VERSION }}
distribution: temurin

- uses: './.github/actions/bootstrap'
Expand Down
Loading

0 comments on commit 16a067a

Please sign in to comment.