diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..2979622 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,13 @@ +name: Build and test +run-name: ${{github.actor}} is running continuous integration pipeline 🚀 + +on: + pull_request: + branches: master + workflow_dispatch: + +jobs: + call-workflow-build-test: + uses: ./github/workflows/templates/build-test.yml + with: + shouldPublishArtifact: false diff --git a/.github/workflows/build-test.yml b/.github/workflows/templates/build-test.yml similarity index 76% rename from .github/workflows/build-test.yml rename to .github/workflows/templates/build-test.yml index 1b9eff4..c921263 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/templates/build-test.yml @@ -1,12 +1,9 @@ -name: Build and test -run-name: ${{github.actor}} is running build-test workflow 🚀 - on: - push: - branches: master - pull_request: - branches: master - workflow_dispatch: + workflow_call: + inputs: + shouldPublishArtifact: + required: true + type: boolean jobs: Build-and-test: @@ -27,5 +24,5 @@ jobs: - name: Run integration tests if: ${{vars.CAN_RUN_INTEGRATION_TESTS == 'true'}} env: - ConnectionStrings__DefaultConnectionString: ${{ secrets.CONNECTIONSTRING_INTEGRATION_TESTS }} + ConnectionStrings__DefaultConnectionString: ${{ secrets.CONNECTIONSTRING_INTEGRATION_TESTS }} run: dotnet test '${{ vars.INTEGRATION_TESTS_PATH }}' --no-build