-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·110 lines (100 loc) · 3.2 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
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
name: CI for stripe-samples/identity
on:
push:
branches:
- "**"
- "!dependabot/**"
env:
STRIPE_PUBLISHABLE_KEY: ${{ secrets.TEST_STRIPE_PUBLISHABLE_KEY }}
STRIPE_SECRET_KEY: ${{ secrets.TEST_STRIPE_SECRET_KEY }}
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
server_test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
runtime:
- server_type: ruby
server_image: ruby:3.0
- server_type: ruby
server_image: ruby:2.6
- server_type: node
server_image: node:14.17
- server_type: node
server_image: node:12.22
- server_type: python
server_image: python:3.9
- server_type: python
server_image: python:3.7
- server_type: java
server_image: maven:3.8-openjdk-16
- server_type: java
server_image: maven:3.8-openjdk-8
- server_type: go
server_image: golang:1.16
- server_type: go
server_image: golang:1.15
- server_type: dotnet
server_image: mcr.microsoft.com/dotnet/sdk:6.0
target:
- sample: modal
tests: modal_server_spec.rb
- sample: redirect
tests: redirect_server_spec.rb
include:
- runtime:
server_type: node-typescript
server_image: node:14.17
target:
sample: modal
tests: modal_server_spec.rb
- runtime:
server_type: node-typescript
server_image: node:12.22
target:
sample: redirect
tests: redirect_server_spec.rb
- runtime:
server_type: dotnet
server_image: mcr.microsoft.com/dotnet/sdk:6.0
target:
sample: modal
tests: modal_server_spec.rb
- runtime:
server_type: dotnet
server_image: mcr.microsoft.com/dotnet/sdk:6.0
target:
sample: redirect
tests: redirect_server_spec.rb
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: "stripe-samples/sample-ci"
path: "sample-ci"
ref: "multiple-runtimes"
- name: Setup dependencies
run: |
source sample-ci/helpers.sh
setup_dependencies
- name: Run tests
run: |
source sample-ci/helpers.sh
install_docker_compose_settings
export STRIPE_WEBHOOK_SECRET=$(retrieve_webhook_secret)
cat <<EOF >> .env
DOMAIN=http://web:4242
EOF
configure_docker_compose_for_integration "${{ matrix.target.sample }}" "${{ matrix.runtime.server_type }}" ../../client "${{ matrix.runtime.server_image }}"
docker-compose up -d && wait_web_server
docker-compose exec -T runner bundle exec rspec spec/${{ matrix.target.tests }}
- name: Collect debug information
if: ${{ failure() }}
run: |
cat .env
cat docker-compose.yml
docker-compose ps -a
docker-compose logs web