forked from stolostron/multiclusterhub-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.17 KB
/
pr-function-tests.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
# Copyright Contributors to the Open Cluster Management project
name: Installer Function Tests (Mock Image)
on:
pull_request_target:
types: [ labeled ]
branches:
- main
# manual trigger
workflow_dispatch:
jobs:
function-test:
if: contains(github.event.pull_request.labels.*.name, 'ok-to-test')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-go@v5
with:
go-version: '^1.20.2' # The Go version to download (if necessary) and use.
- name: Removing 'ok-to-test' label
uses: buildsville/add-remove-label@v1
with:
token: ${{secrets.HUB_OPERATOR_TOKEN}}
label: ok-to-test
type: remove
- name: Run Function Tests (Requires 'ok-to-test' label)
run: |
echo "${{ secrets.QUAY_TOKEN }}" | docker login quay.io/stolostron -u "${{ secrets.QUAY_USER }}" --password-stdin
echo "Running Pull Request Function Tests ..."
bash ./hack/scripts/pull-request-function-test.sh
env:
COLLECTIVE_TOKEN: ${{ secrets.COLLECTIVE_TOKEN }}