Skip to content

Irby/refactoring

Irby/refactoring #5

Workflow file for this run

name: "Backend Tests"
on:
pull_request:
paths:
- 'src/api/**'
jobs:
api-test:
name: Test API
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['6.0.x']
steps:
- uses: actions/checkout@v2
- name: Start Docker containers
working-directory: .
run: docker-compose --project-directory . -f env/local/docker-compose.local.yml up -d
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: ${{ matrix.dotnet-version }}
- uses: actions/cache@v2
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget
- name: Display dotnet version
run: dotnet --version
- name: Install dependencies
working-directory: ./src/api
run: dotnet restore
- name: Build
working-directory: ./src/api
run: dotnet build --no-restore
- name: Run tests
working-directory: ./src/api
run: dotnet test --verbosity normal