Skip to content

Commit decf9ae

Browse files
committed
[CI] Add integration test workflow
1 parent ddb13c4 commit decf9ae

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed
+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Integration Test
2+
on:
3+
workflow_call:
4+
push:
5+
branches: [main]
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}-integration-test
8+
cancel-in-progress: true
9+
jobs:
10+
integration-test:
11+
name: Integration Test
12+
runs-on: ubuntu-22.04
13+
timeout-minutes: 10
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
toolchain: [latest]
18+
steps:
19+
- name: Install Swift
20+
uses: vapor/[email protected]
21+
with:
22+
toolchain: ${{ matrix.toolchain }}
23+
env:
24+
SWIFTLY_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
- name: Checkout
26+
uses: actions/[email protected]
27+
- name: Resolve Swift dependencies
28+
run: swift package resolve
29+
working-directory: ./IntegrationTests
30+
- name: Start Services
31+
run: docker compose up -d
32+
working-directory: ./IntegrationTests
33+
- name: Run Integration Tests
34+
run: swift test --parallel
35+
working-directory: ./IntegrationTests
36+
- name: Export service logs
37+
if: always()
38+
working-directory: ./IntegrationTests
39+
run: |
40+
docker compose logs --no-color > docker-compose-logs.txt
41+
docker compose down
42+
- name: Upload service logs
43+
uses: actions/[email protected]
44+
if: failure()
45+
with:
46+
name: docker-compose-logs.txt
47+
path: IntegrationTests/docker-compose-logs.txt

.github/workflows/pull-request.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ jobs:
1313
name: Unit Test
1414
uses: ./.github/workflows/unit-test.yaml
1515
secrets: inherit
16+
17+
integration_test:
18+
name: Integration Test
19+
uses: ./.github/workflows/integration-test.yaml

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Swift OFREP
22

33
[![Unit Test](https://github.com/swift-open-feature/swift-ofrep/actions/workflows/unit-test.yaml/badge.svg)](https://github.com/swift-open-feature/swift-ofrep/actions/workflows/unit-test.yaml)
4+
[![Integration Test](https://github.com/swift-open-feature/swift-ofrep/actions/workflows/integration-test.yaml/badge.svg)](https://github.com/swift-open-feature/swift-ofrep/actions/workflows/integration-test.yaml)
45
[![codecov](https://codecov.io/gh/swift-open-feature/swift-ofrep/graph/badge.svg?token=YK7Y25KOFU)](https://codecov.io/gh/swift-open-feature/swift-ofrep)
56

67
A cross-platform [OFREP](https://github.com/open-feature/protocol) provider for Swift,

0 commit comments

Comments
 (0)