-
Notifications
You must be signed in to change notification settings - Fork 137
85 lines (79 loc) · 2.29 KB
/
ci-saucelabs.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
name: ci-saucelabs
on:
workflow_dispatch:
inputs:
saucelab_test:
description: 'Enable run a Sauce lab test'
default: true
required: false
type: boolean
push:
branches:
- main
paths-ignore:
- '**.md'
- '**.asciidoc'
pull_request:
branches:
- main
paths-ignore:
- '**.md'
- '**.asciidoc'
# Limit the access of the generated GITHUB_TOKEN
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
test-saucelabs:
name: Test SauceLabs
# Inputs aren't defined on some events
# When undefined, we need to emulate the default value
if: |
inputs.saucelab_test == true || inputs.saucelab_test == null
&& (github.event_name != 'pull_request'
|| ( github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.fork == false ))
runs-on: ubuntu-latest
strategy:
# Saucelab doesn't support running test in //.
max-parallel: 1
matrix:
stack-version:
- '8.0.0-SNAPSHOT'
scope:
- '@elastic/apm-rum'
- '@elastic/apm-rum-core'
- '@elastic/apm-rum-react'
- '@elastic/apm-rum-angular'
- '@elastic/apm-rum-vue'
steps:
- uses: actions/checkout@v4
- name: Run saucelabs tests
uses: ./.github/workflows/run-test
with:
goal: 'test'
mode: 'saucelabs'
scope: ${{ matrix.scope }}
stack-version: ${{ matrix.stack-version }}
sauce-username: ${{ secrets.SAUCE_USERNAME }}
sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
all-tests-saucelabs:
name: All Tests SauceLabs
if: |
always()
&& (inputs.saucelab_test == true || inputs.saucelab_test == null)
&& (github.event_name != 'pull_request'
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.fork == false))
runs-on: ubuntu-latest
needs:
- test-saucelabs
steps:
- id: check
uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current
with:
needs: ${{ toJSON(needs) }}
- run: ${{ steps.check.outputs.isSuccess }}