Skip to content

Commit fe7a393

Browse files
committed
add github action workflow
1 parent a166a21 commit fe7a393

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/cockroachdb.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: LocalStack CockroachDB Extension Tests
2+
3+
on:
4+
push:
5+
paths:
6+
- cockroachdb/**
7+
branches:
8+
- main
9+
pull_request:
10+
paths:
11+
- .github/workflows/cockroachdb.yml
12+
- cockroachdb/**
13+
workflow_dispatch:
14+
15+
env:
16+
LOCALSTACK_DISABLE_EVENTS: "1"
17+
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
18+
19+
jobs:
20+
integration-tests:
21+
name: Run Integration Tests
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 10
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Setup LocalStack and extension
29+
run: |
30+
cd cockroachdb
31+
32+
docker pull localstack/localstack-pro &
33+
docker pull cockroachdb/cockroach &
34+
pip install localstack
35+
36+
make install
37+
make lint
38+
make dist
39+
localstack extensions -v install file://$(ls ./dist/localstack_extension_cockroachdb-*.tar.gz)
40+
41+
DEBUG=1 localstack start -d
42+
localstack wait
43+
44+
- name: Run integration tests
45+
run: |
46+
cd cockroachdb
47+
make test
48+
49+
- name: Print logs
50+
if: always()
51+
run: |
52+
localstack logs
53+
localstack stop

0 commit comments

Comments
 (0)