Skip to content
# This workflow performs tests in .NET.
name: Library net tests
on:
workflow_call:
inputs:
dafny:
description: 'The Dafny version to run'
required: true
type: string
jobs:
testDotNet:
strategy:
fail-fast: false
matrix:
library: [
TestModels/dafny-dependencies/StandardLibrary, # This stores current Polymorph dependencies that all TestModels depend on
TestModels/Aggregate,
# TestModels/AggregateReferences,
TestModels/Constraints,
TestModels/Constructor,
TestModels/Dependencies,
TestModels/Errors,
TestModels/Extendable,
TestModels/Extern,
# TestModels/ExternV2, # Tested only for 4.4.0 below
# TestModels/LocalService,
TestModels/Refinement,
TestModels/Resource,
# TestModels/SimpleTypes/BigDecimal,
# TestModels/SimpleTypes/BigInteger,
TestModels/SimpleTypes/SimpleBlob,
TestModels/SimpleTypes/SimpleBoolean,
# TestModels/SimpleTypes/SimpleByte,
TestModels/SimpleTypes/SimpleDouble,
TestModels/SimpleTypes/SimpleEnum,
# TestModels/SimpleTypes/SimpleEnumV2,
# TestModels/SimpleTypes/SimpleFloat,
TestModels/SimpleTypes/SimpleInteger,
TestModels/SimpleTypes/SimpleLong,
# TestModels/SimpleTypes/SimpleShort,
TestModels/SimpleTypes/SimpleString,
# TestModels/SimpleTypes/SimpleTimestamp,
TestModels/Union,
TestModels/aws-sdks/ddb,
TestModels/aws-sdks/kms,
TestModels/aws-sdks/sqs-via-cli,
]
dotnet-version: [ '6.0.x' ]
os: [ ubuntu-latest ]

Check failure on line 51 in .github/workflows/test_models_net_tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test_models_net_tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 51
dafny-version: [ ${{ inputs.dafny }} ]
include:
- library: TestModels/ExternV2
dafny-version: 4.4.0
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: read
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
steps:
- name: Support longpaths on Git checkout
run: |
git config --global core.longpaths true
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-PolymorphTestModels-Role-us-west-2
role-session-name: NetTests
- uses: actions/checkout@v3
- name: Setup Dafny
uses: dafny-lang/[email protected]
with:
dafny-version: ${{ inputs.dafny }}
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
# GitHub's docs on problem matcher's ::
# https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers
- name: Disable setup-dotnet's problem matcher
# setup-dotnet's problem matcher:
# https://github.com/actions/setup-dotnet/blob/main/.github/csc.json
run: echo "::remove-matcher owner=csc::"
- name: Download Dependencies
working-directory: ./${{ matrix.library }}
run: make setup_net
- name: Setup Java 17 for codegen
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- name: Generate Polymorph Dafny and Dotnet code
shell: bash
working-directory: ./${{ matrix.library }}
run: |
make polymorph_dafny DAFNY_VERSION_OPTION="--dafny-version $DAFNY_VERSION"
make polymorph_net DAFNY_VERSION_OPTION="--dafny-version $DAFNY_VERSION"
- name: Compile ${{ matrix.library }} implementation
shell: bash
working-directory: ./${{ matrix.library }}
run: |
# This works because `node` is installed by default on GHA runners
CORES=$(node -e 'console.log(os.cpus().length)')
make transpile_net CORES=$CORES
- name: Test ${{ matrix.library }}
working-directory: ./${{ matrix.library }}
shell: bash
run: |
make test_net