Merge pull request #15 from DFE-Digital/fix-deploy-dev #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Test | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: true | |
on: | |
push: | |
branches: ["main", "release-*"] | |
pull_request: | |
paths: | |
- '.github/workflows/build-and-test.yml' | |
- 'src/**' | |
jobs: | |
notification-api: | |
name: Notification API | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: src/service/notification-api | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup .NET ${{ vars.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ vars.DOTNET_VERSION }} | |
- name: Package Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore Project | |
shell: bash | |
run: dotnet restore | |
- name: Build Project | |
shell: bash | |
run: dotnet build --no-restore | |
- name: Test Project | |
shell: bash | |
run: dotnet test --no-build --no-restore --verbosity minimal | |
idam-api: | |
name: Idam API | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: src/service/idam-api | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup .NET ${{ vars.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ vars.DOTNET_VERSION }} | |
- name: Package Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore Project | |
shell: bash | |
run: dotnet restore | |
- name: Build Project | |
shell: bash | |
run: dotnet build --no-restore | |
- name: Test Project | |
shell: bash | |
run: dotnet test --no-build --no-restore --verbosity minimal | |
service-directory-api: | |
name: Service Directory API | |
runs-on: windows-2022 | |
defaults: | |
run: | |
working-directory: src/service/service-directory-api | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup .NET ${{ vars.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ vars.DOTNET_VERSION }} | |
- name: Package Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore Project | |
shell: bash | |
run: dotnet restore | |
- name: Build Project | |
shell: bash | |
run: dotnet build --no-restore | |
- name: Test Project | |
shell: bash | |
run: dotnet test --no-build --no-restore --verbosity minimal | |
referral-api: | |
name: Referral API | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: src/service/referral-api | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup .NET ${{ vars.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ vars.DOTNET_VERSION }} | |
- name: Package Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore Project | |
shell: bash | |
run: dotnet restore | |
- name: Build Project | |
shell: bash | |
run: dotnet build --no-restore | |
- name: Test Project | |
shell: bash | |
run: dotnet test --no-build --no-restore --verbosity minimal | |
report-api: | |
name: Report API | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: src/service/report-api | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup .NET ${{ vars.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ vars.DOTNET_VERSION }} | |
- name: Package Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore Project | |
shell: bash | |
run: dotnet restore | |
- name: Build Project | |
shell: bash | |
run: dotnet build --no-restore | |
- name: Test Project | |
shell: bash | |
run: dotnet test --no-build --no-restore --verbosity minimal | |
connect-dashboard-ui: | |
name: Connect Dashboard UI | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: src/ui/connect-dashboard-ui | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup .NET ${{ vars.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ vars.DOTNET_VERSION }} | |
- name: Package Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore Project | |
shell: bash | |
run: dotnet restore | |
- name: Build Project | |
shell: bash | |
run: dotnet build --no-restore | |
- name: Test Project | |
shell: bash | |
run: dotnet test --no-build --no-restore --verbosity minimal | |
connect-ui: | |
name: Connect UI | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: src/ui/connect-ui | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup .NET ${{ vars.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ vars.DOTNET_VERSION }} | |
- name: Package Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore Project | |
shell: bash | |
run: dotnet restore | |
- name: Build Project | |
shell: bash | |
run: dotnet build --no-restore | |
- name: Test Project | |
shell: bash | |
run: dotnet test --no-build --no-restore --verbosity minimal | |
find-ui: | |
name: Find UI | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: src/ui/find-ui | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup .NET ${{ vars.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ vars.DOTNET_VERSION }} | |
- name: Package Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore Project | |
shell: bash | |
run: dotnet restore | |
- name: Build Project | |
shell: bash | |
run: dotnet build --no-restore | |
- name: Test Project | |
shell: bash | |
run: dotnet test --no-build --no-restore --verbosity minimal | |
idam-maintenance-ui: | |
name: IDAM Maintenance UI | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: src/ui/idam-maintenance-ui | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup .NET ${{ vars.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ vars.DOTNET_VERSION }} | |
- name: Package Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore Project | |
shell: bash | |
run: dotnet restore | |
- name: Build Project | |
shell: bash | |
run: dotnet build --no-restore | |
- name: Test Project | |
shell: bash | |
run: dotnet test --no-build --no-restore --verbosity minimal | |
manage-ui: | |
name: Manage UI | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: src/ui/manage-ui | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup .NET ${{ vars.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ vars.DOTNET_VERSION }} | |
- name: Package Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore Project | |
shell: bash | |
run: dotnet restore | |
- name: Build Project | |
shell: bash | |
run: dotnet build --no-restore | |
- name: Test Project | |
shell: bash | |
run: dotnet test --no-build --no-restore --verbosity minimal | |
referral-shared: | |
name: Referral Shared | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: src/shared/referral-shared | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup .NET ${{ vars.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ vars.DOTNET_VERSION }} | |
- name: Package Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore Project | |
shell: bash | |
run: dotnet restore | |
- name: Build Project | |
shell: bash | |
run: dotnet build --no-restore | |
- name: Test Project | |
shell: bash | |
run: dotnet test --no-build --no-restore --verbosity minimal | |
service-directory-shared: | |
name: Service Directory Shared | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: src/shared/service-directory-shared | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup .NET ${{ vars.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ vars.DOTNET_VERSION }} | |
- name: Package Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore Project | |
shell: bash | |
run: dotnet restore | |
- name: Build Project | |
shell: bash | |
run: dotnet build --no-restore | |
- name: Test Project | |
shell: bash | |
run: dotnet test --no-build --no-restore --verbosity minimal | |
shared-kernel: | |
name: Kernel Shared | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: src/shared/shared-kernel | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup .NET ${{ vars.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ vars.DOTNET_VERSION }} | |
- name: Package Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore Project | |
shell: bash | |
run: dotnet restore | |
- name: Build Project | |
shell: bash | |
run: dotnet build --no-restore | |
- name: Test Project | |
shell: bash | |
run: dotnet test --no-build --no-restore --verbosity minimal | |
web-components: | |
name: Web Components Shared | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: src/shared/web-components | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup .NET ${{ vars.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ vars.DOTNET_VERSION }} | |
- name: Package Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore Project | |
shell: bash | |
run: dotnet restore | |
- name: Build Project | |
shell: bash | |
run: dotnet build --no-restore | |
- name: Test Project | |
shell: bash | |
run: dotnet test --no-build --no-restore --verbosity minimal |