Skip to content

Commit e2b2cff

Browse files
committed
Re-enable integration tests
1 parent 69a24af commit e2b2cff

File tree

1 file changed

+52
-45
lines changed

1 file changed

+52
-45
lines changed

.github/workflows/commit.yml

+52-45
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,6 @@ jobs:
6565

6666
- run: go test -v ./...
6767

68-
# - name: Build integration test
69-
# run: go test -c ./integration
70-
#
71-
# - uses: actions/upload-artifact@v2
72-
# with:
73-
# name: integration.test
74-
# path: integration.test
75-
# if-no-files-found: error
76-
7768
# long-running-test:
7869
# name: Run Long Running Unit Test
7970
# runs-on: ubuntu-latest
@@ -114,43 +105,59 @@ jobs:
114105

115106
- run: ./etc/s3_mock.py go test -v ./replica_client_test.go -integration s3
116107

117-
# s3-integration-test:
118-
# name: Run S3 Integration Tests
119-
# runs-on: ubuntu-latest
120-
# needs: build
121-
# steps:
122-
# - uses: actions/download-artifact@v2
123-
# with:
124-
# name: integration.test
125-
# - run: chmod +x integration.test
126-
#
127-
# - run: ./integration.test -test.v -test.run=TestReplicaClient -replica-type s3
128-
# env:
129-
# LITESTREAM_S3_ACCESS_KEY_ID: ${{ secrets.LITESTREAM_S3_ACCESS_KEY_ID }}
130-
# LITESTREAM_S3_SECRET_ACCESS_KEY: ${{ secrets.LITESTREAM_S3_SECRET_ACCESS_KEY }}
131-
# LITESTREAM_S3_REGION: us-east-1
132-
# LITESTREAM_S3_BUCKET: integration.litestream.io
108+
s3-integration-test:
109+
name: Run S3 Integration Tests
110+
runs-on: ubuntu-latest
111+
needs: build
112+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/fix/integration-tests'
113+
concurrency:
114+
group: integration-test-s3
115+
steps:
116+
- uses: actions/checkout@v4
133117

134-
# gcp-integration-test:
135-
# name: Run GCP Integration Tests
136-
# runs-on: ubuntu-latest
137-
# needs: build
138-
# steps:
139-
# - name: Extract GCP credentials
140-
# run: 'echo "$GOOGLE_APPLICATION_CREDENTIALS" > /opt/gcp.json'
141-
# shell: bash
142-
# env:
143-
# GOOGLE_APPLICATION_CREDENTIALS: ${{secrets.GOOGLE_APPLICATION_CREDENTIALS}}
144-
#
145-
# - uses: actions/download-artifact@v2
146-
# with:
147-
# name: integration.test
148-
# - run: chmod +x integration.test
149-
#
150-
# - run: ./integration.test -test.v -test.run=TestReplicaClient -replica-type gcs
151-
# env:
152-
# GOOGLE_APPLICATION_CREDENTIALS: /opt/gcp.json
153-
# LITESTREAM_GCS_BUCKET: integration.litestream.io
118+
- uses: actions/setup-go@v4
119+
with:
120+
go-version: ${{ env.GO_VERSION }}
121+
122+
- run: go env
123+
124+
- run: go install ./cmd/litestream
125+
126+
- run: go test -v ./replica_client_test.go -integration s3
127+
env:
128+
LITESTREAM_S3_ACCESS_KEY_ID: ${{ secrets.LITESTREAM_S3_ACCESS_KEY_ID }}
129+
LITESTREAM_S3_SECRET_ACCESS_KEY: ${{ secrets.LITESTREAM_S3_SECRET_ACCESS_KEY }}
130+
LITESTREAM_S3_REGION: us-east-1
131+
LITESTREAM_S3_BUCKET: integration.litestream.io
132+
133+
gcp-integration-test:
134+
name: Run GCP Integration Tests
135+
runs-on: ubuntu-latest
136+
needs: build
137+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/fix/integration-tests'
138+
concurrency:
139+
group: integration-test-gcp
140+
steps:
141+
- name: Extract GCP credentials
142+
run: 'echo "$GOOGLE_APPLICATION_CREDENTIALS" > /opt/gcp.json'
143+
shell: bash
144+
env:
145+
GOOGLE_APPLICATION_CREDENTIALS: ${{secrets.GOOGLE_APPLICATION_CREDENTIALS}}
146+
147+
- uses: actions/checkout@v4
148+
149+
- uses: actions/setup-go@v4
150+
with:
151+
go-version: ${{ env.GO_VERSION }}
152+
153+
- run: go env
154+
155+
- run: go install ./cmd/litestream
156+
157+
- run: go test -v ./replica_client_test.go -integration gcs
158+
env:
159+
GOOGLE_APPLICATION_CREDENTIALS: /opt/gcp.json
160+
LITESTREAM_GCS_BUCKET: integration.litestream.io
154161

155162
# abs-integration-test:
156163
# name: Run Azure Blob Store Integration Tests

0 commit comments

Comments
 (0)