Skip to content

Commit 8baccb2

Browse files
committed
Add integration tests
1 parent 5fdfcb8 commit 8baccb2

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Run Integration Tests
2+
3+
on: [pull_request, workflow_dispatch]
4+
5+
# Get target and source branch from different variables depending on how it was triggered
6+
env:
7+
TARGET_BRANCH: '${{ github.event.inputs.target-branch }}${{ github.base_ref || github.ref_name }}'
8+
SOURCE_BRANCH: '${{ github.event.inputs.source-branch }}${{ github.head_ref || github.ref_name }}'
9+
10+
jobs:
11+
integration-tests:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
jankyJobName:
16+
- enterprise2-binary-backup
17+
- enterprise2-migration
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 1
22+
- name: Queue ${{ matrix.jankyJobName }} build
23+
run: |
24+
ref="${{ github.ref }}"
25+
merge_branch=${ref#"refs/heads/"}
26+
backup_utils_branch="${{ env.SOURCE_BRANCH }}"
27+
#branch_name="${{ env.TARGET_BRANCH }}"
28+
branch_name="janky-backup-utils-branch-test"
29+
curl -v -X POST \
30+
-u "hubot:${{ secrets.API_AUTH_TOKEN }}" \
31+
-H "Content-Type: application/json" \
32+
-d '{"buildable_name":"${{ matrix.jankyJobName }}","repo":"enterprise2","branch_name": "'"$branch_name"'","env_vars":{"JANKY_ENV_BACKUP_UTILS_BRANCH": "'"$backup_utils_branch"'" },"force":"true","room_id":"#builds"}' \
33+
"https://janky.githubapp.com/api/builds"

0 commit comments

Comments
 (0)