-
Notifications
You must be signed in to change notification settings - Fork 28
61 lines (59 loc) · 2.05 KB
/
integration_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Reusable action of running integration of production suite
on:
workflow_call:
inputs:
FULLSTACK_TEST_REPO:
required: false
type: string
secrets:
CI_USER_TOKEN:
required: true
TRAVIS_COM_TOKEN:
required: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# You should create a personal access token and store it in your repository
token: ${{ secrets.CI_USER_TOKEN }}
repository: 'optimizely/travisci-tools'
path: 'home/runner/travisci-tools'
ref: 'master'
- name: set SDK Branch if PR
env:
HEAD_REF: ${{ github.head_ref }}
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "SDK_BRANCH=$HEAD_REF" >> $GITHUB_ENV
echo "TRAVIS_BRANCH=$HEAD_REF" >> $GITHUB_ENV
- name: set SDK Branch if not pull request
env:
REF_NAME: ${{ github.ref_name }}
if: ${{ github.event_name != 'pull_request' }}
run: |
echo "SDK_BRANCH=$REF_NAME" >> $GITHUB_ENV
echo "TRAVIS_BRANCH=$REF_NAME" >> $GITHUB_ENV
- name: Trigger build
env:
SDK: ruby
FULLSTACK_TEST_REPO: ${{ inputs.FULLSTACK_TEST_REPO }}
BUILD_NUMBER: ${{ github.run_id }}
TESTAPP_BRANCH: master
GITHUB_TOKEN: ${{ secrets.CI_USER_TOKEN }}
EVENT_TYPE: ${{ github.event_name }}
GITHUB_CONTEXT: ${{ toJson(github) }}
#REPO_SLUG: ${{ github.repository }}
PULL_REQUEST_SLUG: ${{ github.repository }}
UPSTREAM_REPO: ${{ github.repository }}
PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }}
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
UPSTREAM_SHA: ${{ github.sha }}
TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }}
TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }}
EVENT_MESSAGE: ${{ github.event.message }}
HOME: 'home/runner'
run: |
echo "$GITHUB_CONTEXT"
home/runner/travisci-tools/trigger-script-with-status-update.sh