Skip to content

Updates20220126

Updates20220126 #353

Workflow file for this run

name: 'build-test'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- master
- 'releases/*'
workflow_dispatch:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: get PWD
run: pwd
- name: run an ls -l
run: ls -lR
working-directory: '${{ github.workspace }}'
- run: |
npm run all
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
services:
sqlserver:
image: mcr.microsoft.com/mssql/server:2022-latest
env:
ACCEPT_EULA: Y
SA_PASSWORD: 'PaQWER123!'
MSSQL_PID: Standard
ports:
- 1433:1433
steps:
- uses: actions/checkout@v4
- name: publish test application
run: dotnet publish -o '${{ github.workspace }}/published-app'
working-directory: '${{ github.workspace }}/test-app/Benday.Testing.Web'
- name: Edit .net core database connection string in appsettings.json
uses: benday-inc/edit-dbconnstr-in-appsettings@main
with:
name: 'default'
connectionstring: 'Server=localhost; Database=Benday.Testing.Web; User Id=sa; Password=PaQWER123!;'
pathtosettingsfile: '${{ github.workspace }}/test-app/Benday.Testing.Web/appsettings.json'
- name: run an ls -l
run: ls -lR
working-directory: '${{ github.workspace }}'
- uses: ./
with:
path_to_directory: '${{ github.workspace }}/test-app/Benday.Testing.Web'
migrations_dll: 'Benday.Testing.Api.dll'
migrations_namespace: 'Benday.Testing.Api'
startup_dll: 'Benday.Testing.Web.dll'
dbcontext_class_name: 'MyDbContext'
automerge:
name: Merge pull request
runs-on: [ubuntu-latest]
needs: [build, test]
if: github.base_ref == 'main' && github.actor == 'dependabot[bot]'
steps:
- name: Merge
uses: actions/github-script@v7
with:
script: |
github.pullRequests.merge({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number
})
github-token: ${{github.token}}