Skip to content

Commit

Permalink
'refactor' workflows
Browse files Browse the repository at this point in the history
add variable for the docker registry
changed ee tests to use base as the base
  • Loading branch information
thefringeninja committed May 2, 2024
1 parent d5bcc35 commit 6e27311
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 47 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
docker-tag:
required: true
type: string
docker-registry:
required: true
type: string
default: docker.eventstore.com/eventstore-ce/eventstoredb-ce

jobs:
test:
Expand All @@ -24,10 +28,17 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to Cloudsmith
if: ${{ github.repository_owner == "EventStore" }}
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/eventstore-ce/eventstoredb-ce:${{ inputs.docker-tag }}
docker pull ${{ inputs.docker-registry }}:${{ inputs.docker-tag }}
- name: Install dotnet SDKs
uses: actions/setup-dotnet@v3
with:
Expand All @@ -43,6 +54,7 @@ jobs:
shell: bash
env:
ES_DOCKER_TAG: ${{ inputs.docker-tag }}
ES_DOCKER_REGISTRY: ${{ inputs.docker-registry }}
run: |
sudo ./gencert.sh
dotnet test --configuration ${{ matrix.configuration }} --blame \
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ on:
description: "Docker tag version"
required: true
type: string
repository:
description: "Docker registry"
required: true
type: string

jobs:
test:
uses: ./.github/workflows/base.yml
with:
docker-tag: ${{ inputs.version }}
docker-registry: ${{ inputs.registry }}
52 changes: 6 additions & 46 deletions .github/workflows/ee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,53 +10,13 @@ on:

jobs:
test:
timeout-minutes: 20
uses: ./.github/workflows/base.yml
if: ${{ github.repository_owner == "EventStore" }}
strategy:
fail-fast: false
matrix:
framework: [ net6.0, net7.0, net8.0 ]
os: [ ubuntu-latest ]
build: [ Streams, PersistentSubscriptions, Operations, UserManagement, ProjectionManagement ]
test: [ Plugins ]
configuration: [ release ]
runs-on: ${{ matrix.os }}
name: EventStore.Client.${{ matrix.test }}/${{ matrix.os }}/${{ matrix.framework }}/24.2.0-jammy
steps:
- name: Checkout
uses: actions/checkout@v3
- shell: bash
run: |
git fetch --prune --unshallow
- name: Login to Cloudsmith
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/eventstore-ee/eventstoredb-commercial:24.2.0-jammy
- 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.build }}
- name: Run Tests
if: ${{ inputs.docker-registry == '' }}
shell: bash
env:
ES_DOCKER_TAG: 24.2.0-jammy
ES_DOCKER_REGISTRY: docker.eventstore.com/eventstore-ee/eventstoredb-commercial
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
build: [ Streams, PersistentSubscriptions, Operations, UserManagement, ProjectionManagement ]
with:
docker-tag: lts
docker-registry: docker.eventstore.com/eventstore-ee/eventstoredb-commercial
1 change: 1 addition & 0 deletions .github/workflows/previous-lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ jobs:
uses: ./.github/workflows/base.yml
with:
docker-tag: previous-lts

0 comments on commit 6e27311

Please sign in to comment.