Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: E2E Tests

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
e2e_tests_ref:
description: 'Branch or ref of sdk-e2e-tests to use'
required: false
default: 'main'

jobs:
e2e-tests:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest

steps:
- name: Checkout SDK
uses: actions/checkout@v4
with:
path: sdk

- name: Checkout sdk-e2e-tests
uses: actions/checkout@v4
with:
repository: segmentio/sdk-e2e-tests
ref: ${{ inputs.e2e_tests_ref || 'main' }}
token: ${{ secrets.E2E_TESTS_TOKEN }}
path: sdk-e2e-tests

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Build e2e-cli
working-directory: sdk/e2e-cli
run: dotnet build -c Release -o build

- name: Run E2E tests
working-directory: sdk-e2e-tests
run: |
./scripts/run-tests.sh \
--sdk-dir "${{ github.workspace }}/sdk/e2e-cli" \
--cli "dotnet ${{ github.workspace }}/sdk/e2e-cli/build/e2e-cli.dll"

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-test-results
path: sdk-e2e-tests/test-results/
if-no-files-found: ignore
34 changes: 34 additions & 0 deletions .github/workflows/publish-e2e-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish E2E CLI

on:
push:
branches: [main]
paths:
- 'e2e-cli/**'
- 'Analytics-CSharp/**'
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout SDK
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'

- name: Build e2e-cli
working-directory: e2e-cli
run: dotnet build -c Release -o build

- name: Upload CLI artifact
uses: actions/upload-artifact@v4
with:
name: e2e-cli-csharp
path: e2e-cli/build/
retention-days: 90
Loading
Loading