Skip to content
Merged
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
29 changes: 28 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,32 @@ on:
push:
pull_request:

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

jobs:
# Ensure terraform is valid
terraform-validate:
name: Terraform validate
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- name: Terraform Initialize
working-directory: ChatInfra
run: terraform init -backend=false

- name: Terraform validate
working-directory: ChatInfra
run: terraform validate

# If terraform is valid check terraform formatting
terraform-format:
name: Terraform Format
runs-on: ubuntu-latest
needs: [terraform-validate]

steps:
- uses: actions/checkout@v4
Expand All @@ -16,9 +38,11 @@ jobs:
working-directory: ChatInfra
run: terraform fmt -recursive -check

# If terraform format is valid check server formatting
chat-server-format:
name: ChatServer Format
runs-on: ubuntu-latest
needs: [terraform-format]

steps:
- uses: actions/checkout@v4
Expand All @@ -32,6 +56,7 @@ jobs:
working-directory: ChatServer
run: ./gradlew ktlintCheck

# If terraform formet is vaild check api tests
api-tests:
name: API Tests
runs-on: ubuntu-latest
Expand All @@ -55,10 +80,11 @@ jobs:
working-directory: ApiServer
run: python -m pytest

# If terraform format is valid check presence tests
presence-tests:
name: Presence Tests
runs-on: ubuntu-latest
needs: [ terraform-format ]
needs: [terraform-format]

steps:
- uses: actions/checkout@v4
Expand All @@ -78,6 +104,7 @@ jobs:
working-directory: PresenceServer
run: python -m pytest

# If chatserver format is valid check chatserver tests
chat-server-tests:
name: Chat Server Tests
runs-on: ubuntu-latest
Expand Down
Loading