Repository navigation
80 lines (69 loc) · 2.5 KB
/
Copy pathtest-sqlserver.yml
File metadata and controls
80 lines (69 loc) · 2.5 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
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Test sqlserver integration
on:
push:
branches: ["main"]
paths:
- "sqlserver/**"
- "tests/**"
- ".github/workflows/test-sqlserver.yml"
pull_request:
paths:
- "sqlserver/**"
- "tests/**"
- ".github/workflows/test-sqlserver.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
integration-test:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout bindings
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: bindings
persist-credentials: false
- name: Checkout openrun
id: openrun
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: openrundev/openrun
path: openrun
persist-credentials: false
- name: Setup Go
id: go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: bindings/sqlserver/go.mod
cache: true
cache-dependency-path: |
bindings/sqlserver/go.sum
openrun/go.sum
- name: Cache OpenRun server
id: openrun-cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/openrun-ci/openrun
key: openrun-server-v1-${{ runner.os }}-${{ runner.arch }}-${{ steps.openrun.outputs.commit }}
- name: Build OpenRun server
if: steps.openrun-cache.outputs.cache-hit != 'true'
working-directory: openrun
run: |
mkdir -p "$HOME/.cache/openrun-ci"
go build -o "$HOME/.cache/openrun-ci/openrun" ./cmd/openrun
- name: Cache commander
id: commander-cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/go/bin/commander
key: commander-${{ runner.os }}-${{ runner.arch }}-go-${{ steps.go.outputs.go-version }}-v2.5.0
- name: Install commander
if: steps.commander-cache.outputs.cache-hit != 'true'
run: go install github.com/commander-cli/commander/v2/cmd/commander@v2.5.0
- name: Integration tests (RPC layer)
working-directory: bindings
run: OPENRUN_SRC="$GITHUB_WORKSPACE/openrun" OPENRUN_TEST_SERVER_BIN="$HOME/.cache/openrun-ci/openrun" ./tests/run_int_tests.sh sqlserver