Skip to content

Commit

Permalink
ops: add pull-request triggers for ci pipelines and prepend ci logic …
Browse files Browse the repository at this point in the history
…to already existing cd pipelines
  • Loading branch information
WarriorsSami committed Jun 22, 2024
1 parent ad48222 commit 42b6341
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ on:

paths:
- "anubis-eval/**"
- ".github/workflows/anubis-eval.yaml"
- ".github/workflows/anubis-eval-cd.yaml"

# pull_request:
# branches:
# - develop
#
# paths:
# - "anubis-eval/**"
# - ".github/workflows/anubis-eval.yaml"
# - ".github/workflows/anubis-eval-cd.yaml"

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: anubis-eval
push: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ on:

paths:
- "enki-problems/**"
- ".github/workflows/enki-problems.yaml"
- ".github/workflows/enki-problems-cd.yaml"

# pull_request:
# branches:
# - develop
#
# paths:
# - "enki-problems/**"
# - ".github/workflows/enki-problems.yaml"
# - ".github/workflows/enki-problems-cd.yaml"

env:
REGISTRY: ghcr.io
Expand All @@ -28,6 +28,26 @@ jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0.x'
- name: Build
run: |
dotnet restore "enki-problems/src/EnkiProblems.HttpApi.Host/EnkiProblems.HttpApi.Host.csproj"
dotnet restore "enki-problems/test/EnkiProblems.Application.Tests/EnkiProblems.Application.Tests.csproj"
cd enki-problems
dotnet build --no-restore
- name: Test
run: |
cd enki-problems
dotnet test -e DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
deploy:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
Expand All @@ -52,7 +72,7 @@ jobs:
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: enki-problems
push: true
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/enki-problems-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
- "enki-problems/**"
- ".github/workflows/enki-problems-ci.yaml"

pull_request:
paths:
- "enki-problems/**"
- ".github/workflows/enki-problems-ci.yaml"

jobs:
build:
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,50 @@ on:

paths:
- "hermes-tests/**"
- ".github/workflows/hermes-tests.yaml"
- ".github/workflows/hermes-tests-cd.yaml"

# pull_request:
# branches:
# - develop
#
# paths:
# - "hermes-tests/**"
# - ".github/workflows/hermes-tests.yaml"
# - ".github/workflows/hermes-tests-cd.yaml"

env:
REGISTRY: ghcr.io
IMAGE_NAME: hermes-tests
HERMES_CONFIG: ${{ secrets.HERMES_CONFIG }}

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: dart-lang/setup-dart@v1
with:
sdk: 2.19.2

- name: Create logs/test.log file
run: |
mkdir -p hermes-tests/logs
touch hermes-tests/logs/test.log
- name: Get dependencies
run: |
cd hermes-tests
dart pub get
- name: Test
run: |
cd hermes-tests
dart test
deploy:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
Expand All @@ -52,7 +78,7 @@ jobs:
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: hermes-tests
push: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ on:

paths:
- "quetzalcoatl-auth/**"
- ".github/workflows/quetzalcoatl-auth.yaml"
- ".github/workflows/quetzalcoatl-auth-cd.yaml"

# pull_request:
# branches:
# - develop
#
# paths:
# - "quetzalcoatl-auth/**"
# - ".github/workflows/quetzalcoatl-auth.yaml"
# - ".github/workflows/quetzalcoatl-auth-cd.yaml"

env:
REGISTRY: ghcr.io
Expand All @@ -28,6 +28,24 @@ jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0.x'
- name: Build
run: |
dotnet restore "quetzalcoatl-auth/Bootstrapper/Bootstrapper.csproj"
dotnet restore "quetzalcoatl-auth/Tests.Integration/Tests.Integration.csproj"
cd quetzalcoatl-auth
dotnet build --no-restore
- name: Test
run: dotnet test -e ASPNETCORE_ENVIRONMENT=Testing "quetzalcoatl-auth/Tests.Integration/Tests.Integration.csproj"

deploy:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
Expand All @@ -52,7 +70,7 @@ jobs:
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: quetzalcoatl-auth
push: true
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/quetzalcoatl-auth-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ name: Quetzalcoatl - Build and Test Auth Service
on:
push:
paths:
- "quetzalcoatl-auth/**"
- ".github/workflows/quetzalcoatl-auth-ci.yaml"
- "quetzalcoatl-auth/**"
- ".github/workflows/quetzalcoatl-auth-ci.yaml"

pull_request:
paths:
- "quetzalcoatl-auth/**"
- ".github/workflows/quetzalcoatl-auth-ci.yaml"

jobs:
build:
Expand Down

0 comments on commit 42b6341

Please sign in to comment.