Skip to content

Commit

Permalink
Allow triggering the test CI workflows manually
Browse files Browse the repository at this point in the history
  • Loading branch information
replaceafill committed May 31, 2024
1 parent a3fcc67 commit 49833a0
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/acceptance-test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
---
name: "Acceptance Test"
on:
workflow_dispatch:
inputs:
am_version:
description: "Archivematica ref (branch, tag or SHA to checkout)"
default: "qa/1.x"
required: true
type: "string"
pull_request:
types: [labeled]
jobs:
test:
if: github.event.label.name == 'AMAUAT'
if: "${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.label.name == 'AMAUAT') }}"
name: "Test ${{ matrix.tag }} on ${{ matrix.browser }}"
runs-on: "ubuntu-22.04"
strategy:
Expand All @@ -30,9 +37,16 @@ jobs:
browser: Firefox
steps:
- name: "Check out repository"
if: "${{ github.event_name != 'workflow_dispatch' }}"
uses: "actions/checkout@v4"
with:
submodules: true
- name: "Check out repository (manually triggered)"
if: "${{ github.event_name == 'workflow_dispatch' }}"
uses: "actions/checkout@v4"
with:
ref: "${{ inputs.am_version || 'qa/1.x' }}"
submodules: true
- name: "Create external volumes"
run: |
make -C hack/ create-volumes
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
---
name: "Test"
on:
workflow_dispatch:
inputs:
am_version:
description: "Archivematica ref (branch, tag or SHA to checkout)"
default: "qa/1.x"
required: true
type: "string"
pull_request:
push:
branches:
Expand Down Expand Up @@ -38,7 +45,13 @@ jobs:
python-version: "3.9"
steps:
- name: "Check out repository"
if: "${{ github.event_name != 'workflow_dispatch' }}"
uses: "actions/checkout@v4"
- name: "Check out repository (manually triggered)"
if: "${{ github.event_name == 'workflow_dispatch' }}"
uses: "actions/checkout@v4"
with:
ref: "${{ inputs.am_version || 'qa/1.x' }}"
- name: "Check out the archivematica-storage-service submodule"
run: |
git submodule update --init hack/submodules/archivematica-storage-service/
Expand Down Expand Up @@ -97,7 +110,13 @@ jobs:
working-directory: "./src/dashboard/frontend/"
steps:
- name: "Check out repository"
if: "${{ github.event_name != 'workflow_dispatch' }}"
uses: "actions/checkout@v4"
- name: "Check out repository (manually triggered)"
if: "${{ github.event_name == 'workflow_dispatch' }}"
uses: "actions/checkout@v4"
with:
ref: "${{ inputs.am_version || 'qa/1.x' }}"
- name: "Set up Node JS"
uses: "actions/setup-node@v4"
with:
Expand All @@ -116,7 +135,13 @@ jobs:
runs-on: "ubuntu-22.04"
steps:
- name: "Check out repository"
if: "${{ github.event_name != 'workflow_dispatch' }}"
uses: "actions/checkout@v4"
- name: "Check out repository (manually triggered)"
if: "${{ github.event_name == 'workflow_dispatch' }}"
uses: "actions/checkout@v4"
with:
ref: "${{ inputs.am_version || 'qa/1.x' }}"
- name: "Set up Python 3.9"
uses: "actions/setup-python@v5"
with:
Expand Down

0 comments on commit 49833a0

Please sign in to comment.