deno.land / x / oauth4webapi@v1.2.2 / .github / workflows / browserstack.yml

browserstack.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Browserstack
on: push: pull_request: pull_request_target: types: - labeled schedule: - cron: '47 11 * * 1' workflow_dispatch:
jobs: unlabel: if: ${{ github.event_name == 'pull_request_target' && github.event.label.name == 'trigger-browserstack' }} runs-on: ubuntu-latest steps: - run: gh pr edit $PR --repo $REPO --remove-label "trigger-browserstack" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR: ${{ github.event.number }} REPO: ${{ github.event.repository.full_name }}
cert: if: ${{ !startsWith(github.event_name, 'pull_request') || (github.event_name == 'pull_request_target' && github.event.label.name == 'trigger-browserstack') }} runs-on: ubuntu-latest outputs: cache-key: ${{ steps.cache-key.outputs.value }} steps: - id: cache-key run: echo "value=letsencrypt-$(date +"%Y%m")" >> $GITHUB_OUTPUT - name: Cache letsencrypt uses: actions/cache@v3 id: cert with: path: letsencrypt key: ${{ steps.cache-key.outputs.value }} - name: Get test certificate if: ${{ steps.cert.outputs.cache-hit != 'true' }} run: | sudo snap install core sudo snap refresh core sudo snap install --classic certbot sudo snap set certbot trust-plugin-with-root=ok sudo snap install certbot-dns-route53 certbot certonly -n -m 'panva.ip@gmail.com' \ --agree-tos \ --dns-route53 \ --config-dir 'letsencrypt/config' \ --work-dir 'letsencrypt/work' \ --logs-dir 'letsencrypt/logs' \ -d oauth4webapi.panva.me env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
browserstack: needs: - cert if: ${{ !startsWith(github.event_name, 'pull_request') || (github.event_name == 'pull_request_target' && github.event.label.name == 'trigger-browserstack') }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: browser: - browserstack:android - browserstack:ios - browserstack:safari steps: - name: Checkout uses: actions/checkout@v3 - name: Setup node uses: actions/setup-node@v3 with: node-version: 18 # lts/hydrogen cache: 'npm' check-latest: true - name: Cache letsencrypt id: cert uses: actions/cache@v3 with: path: letsencrypt key: ${{ needs.cert.outputs.cache-key }} - name: Abort if cert isn't cached if: ${{ steps.cert.outputs.cache-hit != 'true' }} uses: actions/github-script@v6 with: script: | core.setFailed('cert cache hit failed') - run: npm clean-install - name: BrowserStack Env Setup uses: browserstack/github-actions/setup-env@00ce173eae311a7838f80682a5fad5144c4219ad with: username: ${{ secrets.BROWSERSTACK_USERNAME }} access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} build-name: 'BUILD_INFO' project-name: 'REPO_NAME' - name: Start BrowserStackLocal Tunnel uses: browserstack/github-actions/setup-local@00ce173eae311a7838f80682a5fad5144c4219ad with: local-testing: 'start' local-logging-level: 'all-logs' local-identifier: 'random' - name: Run Test Suite run: npm run tap:browsers env: BROWSER: ${{ matrix.browser }} - name: Stop BrowserStackLocal if: ${{ always() }} uses: browserstack/github-actions/setup-local@00ce173eae311a7838f80682a5fad5144c4219ad with: local-testing: 'stop'
oauth4webapi

Version Info

Tagged at
2 years ago