Skip to content
Draft
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
56 changes: 46 additions & 10 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Build
on:

# Always triggers so the required "build-gate" check is never left pending on unrelated PRs.
# The changes job decides whether the compose build runs; the gate reflects the result.
on:
push:
branches:
- main
Expand All @@ -8,23 +11,56 @@ on:
branches:
- main
- develop
- 'feature/**'
- "feature/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
build: ${{ steps.filter.outputs.build }}
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Detect build-relevant changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
build:
- "angular-client/**"
- "scylla-server/**"
- "compose/**"
- ".github/workflows/build-check.yml"

run-build:
needs: changes
if: ${{ needs.changes.outputs.build == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Set up Docker Compose
run: |
sudo apt-get -y update
sudo apt-get -y install docker-compose
- name: Build Docker Compose
working-directory: compose
run: docker compose build

build-gate:
# Required status check. Always runs; green when the build is skipped or passes, red on failure.
needs: [changes, run-build]
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Gate
run: |
if ! docker-compose build; then
echo "Docker Compose build failed."
exit 1 # This will cause the workflow to fail
result="${{ needs.run-build.result }}"
if [ "$result" = "failure" ] || [ "$result" = "cancelled" ]; then
echo "Build failed (result: $result)"
exit 1
fi
echo "Build gate passed (result: $result)"
78 changes: 78 additions & 0 deletions .github/workflows/client-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Client CI

# Always triggers so the required "client-ci-gate" check is never left pending on PRs that
# don't touch the client (path filters on the trigger would block required-check merges).
# The changes job decides whether the real work runs; the gate reflects its result.
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
- "feature/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
client: ${{ steps.filter.outputs.client }}
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Detect client changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
client:
- "angular-client/**"
- ".github/workflows/client-ci.yml"

lint-and-format:
needs: changes
if: ${{ needs.changes.outputs.client == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
working-directory: angular-client
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 20.17.0
cache: "npm"
cache-dependency-path: angular-client/package-lock.json
- name: Install modules
run: npm ci
- name: Run linting check
run: npm run lint -- --max-warnings=0
- name: Run prettier check
run: npm run prettier-check

client-ci-gate:
# Required status check. Always runs; passes when the client job is skipped or succeeds,
# fails only when it actually fails, so path-filtered work never deadlocks a required check.
needs: [changes, lint-and-format]
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Gate
run: |
result="${{ needs.lint-and-format.result }}"
if [ "$result" = "failure" ] || [ "$result" = "cancelled" ]; then
echo "Client CI failed (result: $result)"
exit 1
fi
echo "Client CI gate passed (result: $result)"
10 changes: 10 additions & 0 deletions .github/workflows/client-flutter-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@ name: Flutter Format Check
on:
push:
branches: [ main, develop ]
paths:
- "flutter-client/**"
- ".github/workflows/client-flutter-ci.yml"
pull_request:
branches: [ main, develop ]
paths:
- "flutter-client/**"
- ".github/workflows/client-flutter-ci.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
format-verify:
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/lint-check.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/prettier-check.yml

This file was deleted.

121 changes: 79 additions & 42 deletions .github/workflows/scylla-ci.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,86 @@
name: Scylla CI

# Always triggers so the required "scylla-gate" check is never left pending on non-scylla PRs.
# The changes job decides whether the Rust build/test runs; the gate reflects the result.
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
- 'feature/**'


defaults:
run:
working-directory: scylla-server
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
- "feature/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
changes:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
scylla: ${{ steps.filter.outputs.scylla }}
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Detect scylla changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
scylla:
- "scylla-server/**"
- ".github/workflows/scylla-ci.yml"

build:
needs: changes
if: ${{ needs.changes.outputs.scylla == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: scylla-server
steps:
- name: Setup Rust
uses: actions/checkout@v7
with:
submodules: recursive
- name: Clippy
run: cargo clippy --all-targets --locked
- name: Fmt
run: cargo fmt --check
- name: Start DB
working-directory: compose
run: docker compose up -d odyssey-db
- name: Build
run: cargo build --verbose --locked
- name: Run # so we can migrate the database, run for a little than bail
env:
DATABASE_URL: postgresql://postgres:password@127.0.0.1:5432/postgres
run: |
cargo run --locked & ID=$!; sleep 10s; kill $ID
- name: Test
env:
DATABASE_URL: postgresql://postgres:password@127.0.0.1:5432/postgres
run: cargo test --locked -- --test-threads=1
- name: Cleanup
working-directory: compose
run: docker compose down

steps:
- name: Setup Rust
uses: actions/checkout@v7
with:
submodules: recursive
- name: Clippy
run: cargo clippy --all-targets --locked
- name: Fmt
run: cargo fmt --check
- name: Start DB
working-directory: compose
run: docker compose up -d odyssey-db
- name: Build
run: cargo build --verbose --locked
- name: Run # so we can migrate the database, run for a little than bail
env:
DATABASE_URL: postgresql://postgres:password@127.0.0.1:5432/postgres
run: |
cargo run --locked & ID=$!; sleep 10s; kill $ID
- name: Test
env:
DATABASE_URL: postgresql://postgres:password@127.0.0.1:5432/postgres
run: cargo test --locked -- --test-threads=1
- name: Cleanup
working-directory: compose
run: docker compose down
scylla-gate:
# Required status check. Always runs; green when the build is skipped or passes, red on failure.
needs: [changes, build]
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Gate
run: |
result="${{ needs.build.result }}"
if [ "$result" = "failure" ] || [ "$result" = "cancelled" ]; then
echo "Scylla CI failed (result: $result)"
exit 1
fi
echo "Scylla gate passed (result: $result)"
Loading
Loading