Skip to content
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

Split out CI and deployment pipelines #212

Closed
wants to merge 1 commit into from
Closed
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
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and unit test

on:
push:

jobs:
setup:
uses: communitiesuk/funding-service-design-workflows/.github/workflows/determine-jobs.yml@main
with:
environment: ${{ inputs.environment }}

pre_deploy_tests:
uses: communitiesuk/funding-service-design-workflows/.github/workflows/pre-deploy.yml@main
with:
postgres_unit_testing: true
check_db_migrations: true
assets_required: true

type_checks:
if: ${{ ! contains(fromJSON(needs.setup.outputs.jobs_to_run), 'dev') }}
needs: [setup]
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version: 3.10.x
- name: Install uv
uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a # v5
with:
enable-cache: true
- name: install dependencies
run: uv sync
- name: run type checking
run: uv run mypy

paketo_build:
needs: [ setup ]
permissions:
packages: write
uses: communitiesuk/funding-service-design-workflows/.github/workflows/package.yml@main
with:
version_to_build: ${{ github.sha }}
owner: ${{ github.repository_owner }}
application: funding-service-pre-award
assets_required: true
5 changes: 3 additions & 2 deletions .github/workflows/copilot_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Deploy to AWS
run-name: ${{ github.event_name == 'workflow_dispatch' && format('Deploy to {0}', github.event.inputs.environment) || (github.ref == 'refs/heads/main' && 'Deploy to Test-UAT-Prod' || 'Build & Unit Test') }}
run-name: ${{ github.event_name == 'workflow_dispatch' && format('Deploy to {0}', github.event.inputs.environment) || (github.ref == 'refs/heads/main' && 'Deploy to Test-UAT-Prod') }}

on:
workflow_dispatch:
Expand Down Expand Up @@ -29,6 +29,7 @@ on:
type: boolean
description: Run e2e tests (application)
push:
branches: [ main ]

jobs:
setup:
Expand All @@ -40,7 +41,7 @@ jobs:
uses: communitiesuk/funding-service-design-workflows/.github/workflows/pre-deploy.yml@main
with:
postgres_unit_testing: true
check_db_migrations: true
check_db_migrations: false
assets_required: true

type_checks:
Expand Down