Skip to content

Commit

Permalink
[CI] Add integration test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
slashmo committed Jan 27, 2025
1 parent ddb13c4 commit decf9ae
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Integration Test
on:
workflow_call:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-integration-test
cancel-in-progress: true
jobs:
integration-test:
name: Integration Test
runs-on: ubuntu-22.04
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
toolchain: [latest]
steps:
- name: Install Swift
uses: vapor/[email protected]
with:
toolchain: ${{ matrix.toolchain }}
env:
SWIFTLY_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/[email protected]
- name: Resolve Swift dependencies
run: swift package resolve
working-directory: ./IntegrationTests
- name: Start Services
run: docker compose up -d
working-directory: ./IntegrationTests
- name: Run Integration Tests
run: swift test --parallel
working-directory: ./IntegrationTests
- name: Export service logs
if: always()
working-directory: ./IntegrationTests
run: |
docker compose logs --no-color > docker-compose-logs.txt
docker compose down
- name: Upload service logs
uses: actions/[email protected]
if: failure()
with:
name: docker-compose-logs.txt
path: IntegrationTests/docker-compose-logs.txt
4 changes: 4 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ jobs:
name: Unit Test
uses: ./.github/workflows/unit-test.yaml
secrets: inherit

integration_test:
name: Integration Test
uses: ./.github/workflows/integration-test.yaml
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Swift OFREP

[![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)
[![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)
[![codecov](https://codecov.io/gh/swift-open-feature/swift-ofrep/graph/badge.svg?token=YK7Y25KOFU)](https://codecov.io/gh/swift-open-feature/swift-ofrep)

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

0 comments on commit decf9ae

Please sign in to comment.