Skip to content

Self Service Sign Up - Allow a user to login even when two or more re… #485

Self Service Sign Up - Allow a user to login even when two or more re…

Self Service Sign Up - Allow a user to login even when two or more re… #485

Workflow file for this run

# This workflow will build and test a .NET 6 web API
#
# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples
name: Test|API|Profile Designer
on:
#manually trigger deploy
workflow_dispatch:
# Trigger the workflow on push
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main
env:
# set this to the path to your solution file, defaults to the repository root (this is the folder in the git repo)
SOLUTION_DIRECTORY: './'
# set this to the path to your web app project, defaults to the repository root (this is the folder in the git repo)
PROJECT_DIRECTORY: './api/CESMII.ProfileDesigner.Api'
# Solution file to use
SOLUTION_FILE: 'CESMII.ProfileDesigner.sln'
# Project file to use
PROJECT_NAME: 'CESMII.ProfileDesigner.Api'
# set this to the .NET core version to use
NETCORE_VERSION: "6.0.x"
jobs:
build:
name: Build and Test .NET6 Web API
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up dotnet Core ${{ env.NETCORE_VERSION }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.NETCORE_VERSION }}
- name: Start PostgreSQL on Ubuntu for use by integration tests
run: |
sudo systemctl start postgresql.service
pg_isready
- name: Create additional user
run: |
sudo -u postgres psql --command="CREATE USER profiledesigner SUPERUSER PASSWORD 'cesmii'" --command="\du"
- name: List existing databases
run: |
sudo -u postgres psql -l
- name: Create database
run: |
sudo -u postgres psql --command="CREATE DATABASE profile_designer_local_test WITH OWNER = profiledesigner TABLESPACE = pg_default CONNECTION LIMIT = -1;"
- name: Create schema
run: |
ls -l ./sql
head -5 ./sql/CESMII.ProfileDesigner.DB.sql
sudo -u postgres psql -d profile_designer_local_test < ./sql/CESMII.ProfileDesigner.DB.sql
#sudo -u postgres psql -d profile_designer_local_test --file ./sql/CESMII.ProfileDesigner.DB.sql
- name: List existing databases
run: |
sudo -u postgres psql -l
- name: Restore dependencies (${{env.SOLUTION_FILE}})
run: dotnet restore ${{env.SOLUTION_FILE}}
working-directory: ${{env.SOLUTION_DIRECTORY}}
- name: Build (${{env.SOLUTION_FILE}})
run: dotnet build ${{env.SOLUTION_FILE}} --configuration Staging --no-restore
working-directory: ${{env.SOLUTION_DIRECTORY}}
- name: Test (${{env.SOLUTION_FILE}})
run: dotnet test ${{env.SOLUTION_FILE}} --configuration Staging --no-build --verbosity normal -l:"console;verbosity=normal"
working-directory: ${{env.SOLUTION_DIRECTORY}}