Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB-29-22 - Make CI Test Action More Configurable #300

Merged
merged 4 commits into from
Jun 6, 2024
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
5 changes: 1 addition & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# EditorConfig is awesome:
http://EditorConfig.org

# top-most EditorConfig file
root = true

Expand Down Expand Up @@ -142,5 +139,5 @@ indent_size = 2
[*.{cmd,ps1}]
indent_size = 8

[*.{yaml, yml}]
[*.{yaml,yml}]
indent_size = 2
82 changes: 49 additions & 33 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,67 @@ name: Build

on:
workflow_call:
secrets:
CLOUDSMITH_CICD_USER:
required: false
CLOUDSMITH_CICD_TOKEN:
required: false
inputs:
docker-tag:
required: true
type: string
docker-image:
required: false
type: string
default: eventstore-ce/eventstoredb-ce
test:
required: true
type: string

jobs:
test:
timeout-minutes: 20
strategy:
strategy:
fail-fast: false
matrix:
framework: [ net6.0, net7.0, net8.0 ]
os: [ ubuntu-latest ]
test: [ Streams, PersistentSubscriptions, Operations, UserManagement, ProjectionManagement ]
configuration: [ release ]
runs-on: ${{ matrix.os }}
name: EventStore.Client.${{ matrix.test }}/${{ matrix.os }}/${{ matrix.framework }}/${{ inputs.docker-tag }}
name: ${{ inputs.test }} (${{ matrix.os }}, ${{ matrix.framework }})
env:
CLOUDSMITH_CICD_USER: ${{ secrets.CLOUDSMITH_CICD_USER }}
steps:
- name: Checkout
uses: actions/checkout@v3
- shell: bash
run: |
git fetch --prune --unshallow
- name: Pull EventStore Image
shell: bash
run: |
docker pull docker.eventstore.com/eventstore-ce/eventstoredb-ce:${{ inputs.docker-tag }}
- name: Install dotnet SDKs
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Compile
shell: bash
run: |
dotnet build --configuration ${{ matrix.configuration }} --framework ${{ matrix.framework }} src/EventStore.Client.${{ matrix.test }}
- name: Run Tests
shell: bash
env:
ES_DOCKER_TAG: ${{ inputs.docker-tag }}
run: |
sudo ./gencert.sh
dotnet test --configuration ${{ matrix.configuration }} --blame \
--logger:"GitHubActions;report-warnings=false" --logger:"console;verbosity=normal" \
--framework ${{ matrix.framework }} \
test/EventStore.Client.${{ matrix.test }}.Tests
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to Cloudsmith
if: ${{ env.CLOUDSMITH_CICD_USER != '' }}
uses: docker/login-action@v3
with:
registry: docker.eventstore.com
username: ${{ secrets.CLOUDSMITH_CICD_USER }}
password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }}
- name: Pull EventStore Image
shell: bash
run: |
docker pull docker.eventstore.com/${{ inputs.docker-image }}:${{ inputs.docker-tag }}
- name: Install dotnet SDKs
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Run Tests
shell: bash
env:
ES_DOCKER_TAG: ${{ inputs.docker-tag }}
ES_DOCKER_REGISTRY: docker.eventstore.com/${{ inputs.docker-image }}
run: |
sudo ./gencert.sh
dotnet test --configuration ${{ matrix.configuration }} --blame \
--logger:"GitHubActions;report-warnings=false" --logger:"console;verbosity=normal" \
--framework ${{ matrix.framework }} \
test/EventStore.Client.${{ inputs.test }}.Tests
34 changes: 29 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
name: Test CI
name: CI

on:
pull_request:
push:
branches:
- master
- master
tags:
- v*
- v*

jobs:
test:
ce:
uses: ./.github/workflows/base.yml
strategy:
fail-fast: false
matrix:
docker-tag: [ ci, lts, previous-lts ]
test: [ Streams, PersistentSubscriptions, Operations, UserManagement, ProjectionManagement ]
name: Test CE (${{ matrix.docker-tag }})
with:
docker-tag: ci
docker-tag: ${{ matrix.docker-tag }}
docker-image: eventstore-ce/eventstoredb-ce
test: ${{ matrix.test }}
ee:
uses: ./.github/workflows/base.yml
if: ${{ github.repository_owner == 'EventStore' }}
strategy:
fail-fast: false
matrix:
docker-tag: [ 24.2.0-jammy ]
test: [ Plugins ]
name: Test EE (${{ matrix.docker-tag }})
with:
docker-tag: ${{ matrix.docker-tag }}
docker-image: eventstore-ee/eventstoredb-commercial
test: ${{ matrix.test }}
secrets:
CLOUDSMITH_CICD_USER: ${{ secrets.CLOUDSMITH_CICD_USER }}
CLOUDSMITH_CICD_TOKEN: ${{ secrets.CLOUDSMITH_CICD_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/dispatch-ce.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Dispatch CE

on:
workflow_dispatch:
inputs:
docker-tag:
description: "Docker tag"
required: true
type: string
docker-image:
description: "Docker image"
required: true
type: string

jobs:
test:
uses: ./.github/workflows/base.yml
strategy:
fail-fast: false
matrix:
test: [ Streams, PersistentSubscriptions, Operations, UserManagement, ProjectionManagement ]
name: Test CE (${{ inputs.docker-tag }})
with:
docker-tag: ${{ inputs.docker-tag }}
docker-image: ${{ inputs.docker-image }}
test: ${{ matrix.test }}
29 changes: 29 additions & 0 deletions .github/workflows/dispatch-ee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Dispatch EE

on:
workflow_dispatch:
inputs:
docker-tag:
description: "Docker tag"
required: true
type: string
docker-image:
description: "Docker image"
required: true
type: string

jobs:
test:
uses: ./.github/workflows/base.yml
strategy:
fail-fast: false
matrix:
test: [ Plugins ]
name: Test EE (${{ inputs.docker-tag }})
with:
docker-tag: ${{ inputs.docker-tag }}
docker-image: ${{ inputs.docker-image }}
test: ${{ matrix.test }}
secrets:
CLOUDSMITH_CICD_USER: ${{ secrets.CLOUDSMITH_CICD_USER }}
CLOUDSMITH_CICD_TOKEN: ${{ secrets.CLOUDSMITH_CICD_TOKEN }}
15 changes: 0 additions & 15 deletions .github/workflows/dispatch.yml

This file was deleted.

62 changes: 0 additions & 62 deletions .github/workflows/ee.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/lts.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/previous-lts.yml

This file was deleted.

Loading
Loading