-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (45 loc) · 1.56 KB
/
ci.yaml
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
name: ci
on:
pull_request:
branches: [dev, beta, stable, master]
jobs:
run_tests:
runs-on: ubuntu-latest
steps:
# This Clean step simply checks if there's already a workflow running from the last
# commit and cancels it if there is. This helps us save on cloud cost in the long run.
# See https://github.com/rokroskar/workflow-run-cleanup-action for more information.
- name: Clean
uses: rokroskar/workflow-run-cleanup-action@v0.2.2
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "github.ref != 'refs/heads/master'"
- name: Checkout Repo
uses: actions/checkout@v2
- name: Auth with Gcloud
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCP_DEV_SA_KEY }}
- name: Set up Gcloud SDK
uses: google-github-actions/setup-gcloud@v0
with:
project_id: zesty-dev
- name: Delete Old Screenshots
run: gsutil rm gs://cypress_screenshots/* || true
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: "16.5.0"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Install Dependencies
run: npm install
- name: Setup Testing Environment
run: npm run ci:test:setup
- name: Run Tests
run: npm run ci
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Upload Screenshots
if: ${{ failure() }}
run: ./ci/scripts/upload_debug_screenshots_to_gcp.sh