From 2f92161d3633d04f16853d2d127e19c60107fe45 Mon Sep 17 00:00:00 2001 From: "Luke Parker [SSW]" <10430890+Hona@users.noreply.github.com> Date: Mon, 25 Mar 2024 16:36:19 +1000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20Create=20a=20meta-integration=20?= =?UTF-8?q?test=20(#258)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create meta-test.yml * Update meta-test.yml --- .github/workflows/meta-test.yml | 72 +++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/meta-test.yml diff --git a/.github/workflows/meta-test.yml b/.github/workflows/meta-test.yml new file mode 100644 index 00000000..a7443230 --- /dev/null +++ b/.github/workflows/meta-test.yml @@ -0,0 +1,72 @@ +name: Meta Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + name: "Build" + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Cache + uses: actions/cache@v3 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + restore-keys: | + ${{ runner.os }}-nuget- + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + + # Tests that the dotnet new template is valid + - name: Install + run: dotnet new install . + + # Tests that the template follows the parent structure + # Tests that the dotnet new command works 'hona-vsa' + - name: Create new Project + run: | + mkdir -p ./temp/MyTestApp + cd ./temp/MyTestApp + dotnet new ssw-ca + + # Tests that a fresh project can be built (in debug mode) + - name: Build fresh Project + run: | + cd ./temp/MyTestApp + dotnet build --configuration Debug + + # Tests that a query can be generated + - name: Create a query + run: | + cd src/Application/Features + mkdir Products + cd Products + dotnet new ssw-ca-query --name GetProducts --entityName Product --slnName MyTestApp + + # Tests that a query leaves the app in a buildable state + - name: Build after a query + run: | + cd ./temp/MyTestApp + dotnet build --configuration Release + + # Tests that a command can be generated + - name: Create a command + run: | + cd src/Application/Features + cd Products + dotnet new ssw-ca-command --name CreateProduct --entityName Product --slnName MyTestApp + + # Tests that a command leaves the app in a buildable state + - name: Build after a command + run: | + cd ./temp/MyTestApp + dotnet build --configuration Release