Repository navigation
65 lines (62 loc) · 2.19 KB
/
Copy pathapi-acceptance.yml
File metadata and controls
65 lines (62 loc) · 2.19 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
name: api-acceptance
on:
workflow_call:
inputs:
ref:
type: string
required: true
container:
description: Verify the Core image as well as standalone commands
type: boolean
default: true
permissions:
contents: read
jobs:
official-client:
runs-on: ${{ vars.OAC_USE_GITHUB_RUNNERS == 'true' && 'ubuntu-24.04' || 'blacksmith-2vcpu-ubuntu-2404' }}
timeout-minutes: 20
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: oac_ci_tests
POSTGRES_USER: oac
POSTGRES_PASSWORD: oac_test_only
ports:
- 5432/tcp
options: >-
--health-cmd "pg_isready -U oac -d oac_ci_tests"
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v7
with:
ref: ${{ inputs.ref }}
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache: true
- name: Build standalone commands
run: |
OAC_DEV_CORE_BUILD_DIR="$RUNNER_TEMP/oac-core-build" make build-core
"$RUNNER_TEMP/oac-core-build/oac-core-device" --help
"$RUNNER_TEMP/oac-core-build/oac-core-environment-key" --help
- uses: ./.github/actions/official-sdk
- name: Verify official-client HTTP compatibility
env:
OAC_TEST_DATABASE_URL: postgres://oac:oac_test_only@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/oac_ci_tests?sslmode=disable
OAC_TEST_SERVER_BIN: ${{ runner.temp }}/oac-core-build/oac-core
OAC_TEST_OFFICIAL_SDK_PYTHON: python
run: |
python services/core/tests/official_schema_test.py
python services/core/tests/official_client.py
- uses: ./.github/actions/e2b-provider
if: inputs.container
- name: Verify the distribution's Core image
if: inputs.container
env:
OAC_TEST_DATABASE_URL: postgres://oac:oac_test_only@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/oac_ci_tests?sslmode=disable
OAC_DEV_CORE_IMAGE: oac-core:ci
OAC_TEST_OFFICIAL_SDK_PYTHON: python
run: make check-core-container