-
-
Notifications
You must be signed in to change notification settings - Fork 7
173 lines (148 loc) · 4.22 KB
/
sdks-pr.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: SDK
on:
pull_request:
jobs:
go-sdk:
name: Go SDK
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.19', '1.20' ]
timeout-minutes: 30
defaults:
run:
working-directory: ./sdk/go
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD
extra_args: --debug --only-verified
- name: Test
run: go test -v -coverprofile=coverage.out -covermode=atomic -race ./...
env:
PESTO_TOKEN: ${{ secrets.PESTO_TOKEN }}
- name: Codecov
uses: codecov/codecov-action@v3
with:
flags: sdk-go
js-sdk:
name: JavaScript SDK
runs-on: ubuntu-latest
container: node:lts
timeout-minutes: 30
defaults:
run:
working-directory: ./sdk/javascript
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD
extra_args: --debug --only-verified
- name: Update OS
run: >
apt-get update -y && apt-get upgrade -y &&
apt-get install -y curl tar gzip openssl build-essential &&
curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb &&
apt install -y ./google-chrome-stable_current_amd64.deb
- name: Install dependency
run: npm ci
- name: Lint
run: npx eslint --fix --ext .ts --ignore-path .gitignore .
- name: Test
run: npx vitest run --coverage --threads=false
env:
PESTO_TOKEN: ${{ secrets.PESTO_TOKEN }}
- name: Codecov
uses: codecov/codecov-action@v3
with:
flags: sdk-javascript
dotnet-sdk:
name: .NET SDK
runs-on: ubuntu-latest
strategy:
matrix:
dotnet: [ '3.x', '6.x', '7.x' ]
timeout-minutes: 30
defaults:
run:
working-directory: ./sdk/dotnet
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet }}
- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD
extra_args: --debug --only-verified
- name: Test
run: dotnet test Pesto.sln --collect "XPlat Code Coverage"
env:
PESTO_TOKEN: ${{ secrets.PESTO_TOKEN }}
- name: Codecov
uses: codecov/codecov-action@v3
with:
flags: sdk-dotnet
python-sdk:
name: Python Check
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11']
timeout-minutes: 30
defaults:
run:
working-directory: ./sdk/python
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD
extra_args: --debug --only-verified
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-test.txt
- name: Formatting
run: black --check pesto tests
- name: Lint
run: mypy pesto tests
- name: Run Pytest
run: pytest . --cov-report term-missing --cov-report xml --cov pesto
env:
PESTO_TOKEN: ${{ secrets.PESTO_TOKEN }}
- name: Code Coverage Report
uses: codecov/codecov-action@v3
with:
flags: sdk-python