Skip to content

Upgrade babel

Upgrade babel #1275

name: "MemCheck build, test and deploy to Azure"
on:
push:
branches:
- master
jobs:
build-test-deploy:
name: "MemCheck compilation, test and deployment to prod"
runs-on: windows-latest
env:
NETCORE_VERSION: "7.0"
COMPIL_CONFIG: "Release"
WEBUI_PUBLISH_FOLDER: "./Published"
AZURE_WEBAPP_NAME: "memcheckfr"
AZURE_FUNCTIONS_PUBLISH_FOLDER: "./AzFuncPublished"
AZURE_FUNCTIONS_NAME_IN_AZURE: "MemCheckAzureFunctions"
AZURE_FUNCTIONS_PROJECT_NAME: "MemCheck.AzureFunctions"
steps:
- uses: actions/[email protected]
- name: "Tell environment variables"
run: |
echo "Several environment variables"
echo "GITHUB_WORKFLOW: $env:GITHUB_WORKFLOW"
echo "GITHUB_RUN_ID: $env:GITHUB_RUN_ID"
echo "GITHUB_RUN_NUMBER: ${env:GITHUB_RUN_NUMBER}"
echo "GITHUB_ACTOR: $env:GITHUB_ACTOR"
echo "GITHUB_EVENT_NAME: $env:GITHUB_EVENT_NAME"
echo "GITHUB_EVENT_PATH: $env:GITHUB_EVENT_PATH"
echo "GITHUB_WORKSPACE: $env:GITHUB_WORKSPACE"
echo "GITHUB_SHA: $env:GITHUB_SHA"
echo "GITHUB_REF: $env:GITHUB_REF"
echo "NETCORE_VERSION: $env:NETCORE_VERSION"
- name: "Set up .NET on machine (version ${{env.NETCORE_VERSION}})"
uses: actions/[email protected]
with:
dotnet-version: ${{env.NETCORE_VERSION}}
- name: "Tell installed dotnet SDKs"
# Remember that in global.json we require a precise version of the SDK
run: dotnet --list-sdks
- name: "Clean with dotnet"
run: dotnet clean --configuration ${{env.COMPIL_CONFIG}}
- name: "Install JavaScript modules"
run: yarn
- name: "Run JavaScript lint with ESLint"
run: yarn lint
- name: "Run JavaScript unit-tests with jest"
run: yarn unit-tests
- name: "Restore NuGet packages"
run: dotnet restore
- name: "Build the root sln with dotnet"
run: dotnet build --no-restore --configuration ${{env.COMPIL_CONFIG}} --version-suffix "$env:GITHUB_RUN_NUMBER"
- name: "Run unit tests"
env:
CONNECTION_STRING_FOR_DB_USABILITY_CHECK: ${{secrets.MEMCHECK_PROD_DB_CONNECTION_STRING}}
run: dotnet test --configuration ${{env.COMPIL_CONFIG}}
- name: "Publish: prepare the project WebUI for deployment"
run: dotnet publish --no-build --configuration ${{env.COMPIL_CONFIG}} -o ${{env.WEBUI_PUBLISH_FOLDER}} --no-self-contained MemCheck.WebUI
- name: "Telling size of WebUI publish folder"
run: du -sh ${{env.WEBUI_PUBLISH_FOLDER}}
- name: "Publish: prepare the project ${{env.AZURE_FUNCTIONS_PROJECT_NAME}} for deployment"
run: dotnet publish --no-build --configuration ${{env.COMPIL_CONFIG}} -o ${{env.AZURE_FUNCTIONS_PUBLISH_FOLDER}} --no-self-contained ${{env.AZURE_FUNCTIONS_PROJECT_NAME}}
- name: "Telling size of ${{env.AZURE_FUNCTIONS_PROJECT_NAME}} publish folder"
run: du -sh ${{env.AZURE_FUNCTIONS_PUBLISH_FOLDER}}
# - name: Upload published version as Artifact
# uses: actions/upload-artifact@v2
# with:
# name: MemCheck
# path: ${{env.WEBUI_PUBLISH_FOLDER}}
- name: "Deploy WebUI to MemCheck Azure Web App"
uses: azure/[email protected]
with:
app-name: '${{env.AZURE_WEBAPP_NAME}}'
slot-name: 'production'
publish-profile: ${{secrets.MEMCHECK_PUBLISH_PROFILE}}
package: ${{env.WEBUI_PUBLISH_FOLDER}}
- name: "Deploy to ${{env.AZURE_FUNCTIONS_NAME_IN_AZURE}} Azure function"
uses: azure/[email protected]
with:
app-name: '${{env.AZURE_FUNCTIONS_NAME_IN_AZURE}}'
publish-profile: ${{secrets.MEMCHECK_AZUREFUNC_PUBLISH_PROFILE}}
package: ${{env.AZURE_FUNCTIONS_PUBLISH_FOLDER}}