forked from spiceai/spiceai
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (58 loc) · 2.07 KB
/
integration_management_api.yml
File metadata and controls
67 lines (58 loc) · 2.07 KB
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
---
name: integration tests (management API)
on:
schedule:
- cron: '0 2 * * *' # Daily at 02:00 UTC
workflow_dispatch:
inputs:
update_snapshots:
description: 'Update the snapshots?'
required: false
default: 'no'
type: choice
options:
- 'always'
- 'no'
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'trunk' && github.sha || 'any-sha' }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
CARGO_NET_RETRY: 10
CARGO_HTTP_TIMEOUT: 60
jobs:
test-management-api:
name: Test Management API Integration
runs-on: 'spiceai-macos'
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
ref: ${{ github.sha }}
fetch-depth: 1
- name: Set up Rust
uses: ./.github/actions/setup-rust
- name: Authenticate with Spice Cloud dev API
uses: ./.github/actions/management-login
with:
client-id: ${{ secrets.MANAGEMENT_OAUTH_CLIENT_ID }}
client-secret: ${{ secrets.MANAGEMENT_OAUTH_CLIENT_SECRET }}
env-name: SPICE_SPICEAI_TOKEN
- name: Run management API integration tests
env:
INSTA_UPDATE: ${{ github.event_name == 'schedule' && 'always' || github.event.inputs.update_snapshots }}
SPICE_CLOUD_API_URL: "https://dev-api.spice.ai"
run: |
if [ -z "$SPICE_SPICEAI_TOKEN" ] ; then
echo "Error: SPICE_SPICEAI_TOKEN is not set. Management login may have failed."
exit 1
fi
cargo test -p spice --test cloud_integration -- --test-threads=1
- name: Push snapshots to branch
if: github.event.inputs.update_snapshots == 'always' || github.event_name == 'schedule'
uses: ./.github/actions/push-snap-changes
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: 'fix: Update Management API integration test snapshots'