96 lines (83 loc) · 2.68 KB
/
pull-request.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
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
name: Pull Request
on:
pull_request:
branches: [master]
jobs:
verify:
name: Acceptance Test
runs-on: ubuntu-latest
env:
CI: 1
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Use Node v16
uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Send Securely Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-app-cache
key: ${{ runner.os }}-buildx-app-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-app-
- name: Build Send Securely Docker image (with cache)
uses: docker/build-push-action@v2
with:
context: .
push: false
load: true
tags: |
send-securely
send-securely:${{ github.sha }}
send-securely:latest
cache-from: type=local,src=/tmp/.buildx-app-cache
cache-to: type=local,dest=/tmp/.buildx-app-cache-new
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move caches
run: |
rm -rf /tmp/.buildx-app-cache
mv /tmp/.buildx-app-cache-new /tmp/.buildx-app-cache
- name: Cache Cypress binary
uses: actions/cache@v1
with:
path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-cypress-${{ hashFiles('**/package.json') }}
restore-keys: |
cypress-${{ runner.os }}-cypress-
- name: Install deps (with cache)
uses: bahmutov/npm-install@v1
with:
install-command: yarn --frozen-lockfile --no-progress --ignore-scripts
env:
CYPRESS_INSTALL_BINARY: 0
# Install and check Cypress binary
- run: yarn run cypress install
- run: yarn run cypress cache list
- name: Verify Acceptance tests
run: make verify
env:
SKIP_BUILD: 1 # we already built the image, should just run it instead
- name: Stop services
if: always()
run: make stop-docker
view-synthetic-test-diff:
runs-on: ubuntu-latest
env:
CI: 1
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Update Synthetic Tests
uses: ./.github/composite/update-synthetic-tests
with:
is-pr-workflow: true
pulumi-stack: basistheory/prod
pulumi-access-token: ${{ secrets.PULUMI_ACCESS_TOKEN }}
datadog-app-key: ${{ secrets.DATADOG_APP_KEY }}
datadog-api-key: ${{ secrets.DATADOG_API_KEY }}