Add tests for Customer endpoint #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sample App Tests | |
on: | |
pull_request: | |
paths: | |
- '**/*.cs' | |
- '**/*.csproj' | |
- '**/*.sln' | |
jobs: | |
dotnet-test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
dotnet-version: [ '8.0.x' ] | |
services: | |
fauna: | |
image: fauna/faunadb | |
ports: | |
- 8443:8443 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup dotnet ${{ matrix.dotnet-version }} | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Install Fauna CLI | |
run: npm install -g fauna-shell | |
- name: Push schema | |
run: | | |
fauna create-database --url http://localhost:8443 --secret secret ECommerceDotnet | |
cat << EOF > .fauna-project | |
schema_directory=schema | |
default=local | |
[environment.local] | |
endpoint=local | |
database=EcommerceDotnet | |
EOF | |
echo .fauna-project | |
fauna create-key --url=http://localhost:8443 --secret=secret EcommerceDotnet server | |
fauna schema push -y --url http://localhost:8443 --secret secret | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Test | |
run: dotnet test --no-build --verbosity normal |