-
Notifications
You must be signed in to change notification settings - Fork 1
128 lines (108 loc) · 3.1 KB
/
test-dpm.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
name: test-dpm
run-name: ${{ github.actor }} is running test-dpm
on: [push]
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout sources
uses: actions/checkout@v2
- name: Install Rust
run: rustup show
- name: cargo check
run: cargo check
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Checkout sources
uses: actions/checkout@v2
- name: Install Rust
run: rustup show
- name: cargo test
env:
PATCH_AUTH_TOKEN: ${{ secrets.PATCH_AUTH_TOKEN }}
DPM_AUTH_TOKEN: ${{ secrets.DPM_AUTH_TOKEN }}
SNOWSQL_ACCOUNT: ${{ secrets.SNOWSQL_ACCOUNT }}
SNOWSQL_USER: ${{ secrets.SNOWSQL_USER }}
SNOWSQL_PWD: ${{ secrets.SNOWSQL_PWD }}
SNOWSQL_DATABASE: ${{ secrets.SNOWSQL_DATABASE }}
SNOWSQL_WAREHOUSE: ${{ secrets.SNOWSQL_SCHEMA }}
run: cargo test
nodejs-test:
name: Static TypeScript Test Suite
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Run tests
working-directory: ./static/nodejs
run: |
npm ci
npm run build --if-present
npm test
python-test:
name: Static Python Test Suite
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install poetry
run: |
pipx install poetry
- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install dependencies
working-directory: ./static/python
run: |
poetry install --no-root
- name: Run tests
working-directory: ./static/python
run: |
poetry run pytest
lints:
name: Format and Linting
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout sources
uses: actions/checkout@v2
- name: Install Rust
run: rustup show
- name: cargo fmt
run: cargo fmt --all --check
- name: cargo clippy
run: cargo clippy -- -D warnings