Skip to content

Add PR Verify Pipelines #22

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

Merged
merged 6 commits into from
Sep 21, 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
94 changes: 0 additions & 94 deletions .github/workflows/anubis-eval-cd.yaml

This file was deleted.

32 changes: 24 additions & 8 deletions .github/workflows/anubis-eval-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name: Anubis - Build and Test Submissions Service
name: Anubis - Build Docker image and publish to GHCR and Docker Hub

on:
push:
paths:
- "anubis-eval/**"
- ".github/workflows/anubis-eval-ci.yaml"
tags:
- "anubis/**"

pull_request:
paths:
- "anubis-eval/**"
- ".github/workflows/anubis-eval-ci.yaml"
env:
NAMESPACE: pantheonix
REPOSITORY: anubis
IMAGE_NAME: anubis-eval
BUILD_CONTEXT: anubis-eval

jobs:
build:
name: Build and Test Anubis Eval Microservice
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -44,3 +45,18 @@ jobs:

- name: Test
run: cargo nextest run --all-features --profile ci

deploy-to-ghcr:
needs: build
uses: ./.github/workflows/step-deploy-to-ghcr.yaml
with:
image_name: ${{ env.IMAGE_NAME }}
build_context: ${{ env.BUILD_CONTEXT }}

deploy-to-docker-hub:
needs: build
uses: ./.github/workflows/step-deploy-to-docker-hub.yaml
with:
namespace: ${{ env.NAMESPACE }}
repository: ${{ env.REPOSITORY }}
build_context: ${{ env.BUILD_CONTEXT }}
44 changes: 44 additions & 0 deletions .github/workflows/anubis-eval-pr-verify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Anubis - PR Verify

on:
pull_request:
branches:
- develop
paths:
- "anubis-eval/**"
- ".github/workflows/anubis-eval-pr-verify.yaml"

jobs:
build:
name: Build and Test Anubis Eval Microservice
runs-on: ubuntu-latest
defaults:
run:
working-directory: anubis-eval

steps:
- uses: actions/checkout@v4

- name: Run docker-compose
uses: hoverkraft-tech/compose-action@v2.0.1
with:
compose-file: "./anubis-eval/tests-setup/docker-compose.yaml"
up-flags: "--build -d"

- name: Setup rust
uses: hecrj/setup-rust-action@v2
with:
rust-version: '1.72.0'

- name: Install cargo-nextest
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-nextest
version: '0.9.64'
locked: true

- name: Build
run: cargo build --release

- name: Test
run: cargo nextest run --all-features --profile ci
26 changes: 26 additions & 0 deletions .github/workflows/dapr-config-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Dapr - Build Docker image and publish to GHCR and Docker Hub

on:
push:
tags:
- "dapr/**"

env:
NAMESPACE: pantheonix
REPOSITORY: asgard-dapr
IMAGE_NAME: asgard-dapr-config
BUILD_CONTEXT: dapr

jobs:
deploy-to-ghcr:
uses: ./.github/workflows/step-deploy-to-ghcr.yaml
with:
image_name: ${{ env.IMAGE_NAME }}
build_context: ${{ env.BUILD_CONTEXT }}

deploy-to-docker-hub:
uses: ./.github/workflows/step-deploy-to-docker-hub.yaml
with:
namespace: ${{ env.NAMESPACE }}
repository: ${{ env.REPOSITORY }}
build_context: ${{ env.BUILD_CONTEXT }}
81 changes: 0 additions & 81 deletions .github/workflows/enki-problems-cd.yaml

This file was deleted.

34 changes: 25 additions & 9 deletions .github/workflows/enki-problems-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name: Enki - Build and Test Problems Service
name: Enki - Build Docker image and publish to GHCR and Docker Hub

on:
push:
paths:
- "enki-problems/**"
- ".github/workflows/enki-problems-ci.yaml"
tags:
- "enki/**"

pull_request:
paths:
- "enki-problems/**"
- ".github/workflows/enki-problems-ci.yaml"
env:
NAMESPACE: pantheonix
REPOSITORY: enki
IMAGE_NAME: enki-problems
BUILD_CONTEXT: enki-problems

jobs:
build:
name: Build and Test Enki Problems Microservice
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -30,4 +31,19 @@ jobs:
dotnet restore "test/EnkiProblems.Application.Tests/EnkiProblems.Application.Tests.csproj"
dotnet build --no-restore
- name: Test
run: dotnet test -e DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
run: dotnet test -e DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false

deploy-to-ghcr:
needs: build
uses: ./.github/workflows/step-deploy-to-ghcr.yaml
with:
image_name: ${{ env.IMAGE_NAME }}
build_context: ${{ env.BUILD_CONTEXT }}

deploy-to-docker-hub:
needs: build
uses: ./.github/workflows/step-deploy-to-docker-hub.yaml
with:
namespace: ${{ env.NAMESPACE }}
repository: ${{ env.REPOSITORY }}
build_context: ${{ env.BUILD_CONTEXT }}
31 changes: 31 additions & 0 deletions .github/workflows/enki-problems-pr-verify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Enki - PR Verify

on:
pull_request:
branches:
- develop
paths:
- "enki-problems/**"
- ".github/workflows/enki-problems-pr-verify.yaml"

jobs:
build:
name: Build and Test Enki Problems Microservice
runs-on: ubuntu-latest
defaults:
run:
working-directory: enki-problems

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