-
Notifications
You must be signed in to change notification settings - Fork 106
66 lines (64 loc) · 2.01 KB
/
pr.yml
File metadata and controls
66 lines (64 loc) · 2.01 KB
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
name: Pull Request CI
on:
pull_request_target:
branches:
- main
- glsl-dependent
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.1
with:
persist-credentials: false
- run: |
git fetch origin ${{ github.event.pull_request.head.sha }}
git checkout ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v2-beta
with:
node-version: "15.x"
- run: npm ci
- run: |
npm test
sed -i '/out\//d' .gitignore
sed -i '/out-wpt\//d' .gitignore
- run: |
cat << EOF >> firebase.json
{
"hosting": {
"public": ".",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}
EOF
cat << EOF >> .firebaserc
{
"projects": {
"default": "gpuweb-prs"
}
}
EOF
- id: deployment
continue-on-error: true
uses: FirebaseExtended/action-hosting-deploy@v0
with:
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
expires: 30d
channelId: cts-prs-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}
- uses: peter-evans/create-or-update-comment@v1
continue-on-error: true
if: ${{ steps.deployment.outcome == 'success' }}
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Previews, as seen at the time of posting this comment:
[**Run this PR's tests live**](${{ steps.deployment.outputs.details_url }}/standalone/)
<sub>${{ github.event.pull_request.head.sha }}</sub>
<!--
pr;label;sha
${{ github.event.pull_request.number }};${{ github.event.pull_request.head.label }};${{ github.event.pull_request.head.sha }}
-->