Skip to content

update GH actions

update GH actions #540

Workflow file for this run

name: Run Tests On Push
on:
[push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['8.x']
steps:
- uses: actions/checkout@v3
- name: Check out ct-data
uses: actions/checkout@v3
with:
repository: mitchellscot/ct-data
token: ${{ secrets.CHECKOUT_CT_DATA_TOKEN }}
path: ./ct-data
- name: Copy Appsettings.Development.json
run: cp ./ct-data/appsettings.Development.json ./src/appsettings.Development.json
- name: Copy Appsettings.Test.json
run: cp ./ct-data/appsettings.Test.json ./src/appsettings.Test.json
- name: Add Variables To Appsettings Files
uses: microsoft/variable-substitution@v1
with:
files: ./src/appsettings.Test.json
env:
AppSettings.Secret: ${{ secrets.SECRET }}
AppSettings.ConnectionStrings.Development: ${{ secrets.CONNECTION_STRING }}
AppSettings.ConnectionStrings.Test: ${{ secrets.CONNECTION_STRING }}
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install dependencies
working-directory: src
run: dotnet restore
- name: Test
working-directory: src
run: dotnet test --no-restore --verbosity normal