diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1c1a8dd42a4..0a64b12a80d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,10 +8,38 @@ on: - '[0-9]+.[0-9]+.[0-9]+*' jobs: + unittests: + name: Unit tests + + runs-on: ubuntu-latest + + steps: + - name: Support longpaths + run: git config --global core.longpaths true + - name: Checkout + uses: actions/checkout@v2 + - name: Setup dotnet 3.1 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1' # SDK Version to use. + - run: dotnet restore --configfile Nuget.config --packages ../packages + working-directory: ./commercetools.Sdk + - run: dotnet build --no-restore --source ../packages -c Release + working-directory: ./commercetools.Sdk + - run: dotnet test --verbosity=normal Tests/commercetools.Api.Serialization.Tests --no-build -c Release + working-directory: ./commercetools.Sdk + - run: dotnet test --verbosity=normal Tests/commercetools.Sdk.Api.Tests --no-build -c Release + working-directory: ./commercetools.Sdk + - run: dotnet test --verbosity=normal Tests/commercetools.Sdk.ImportApi.Tests --no-build -c Release + working-directory: ./commercetools.Sdk + - run: dotnet test --verbosity=normal Tests/commercetools.Sdk.MLApi.Tests --no-build -c Release + working-directory: ./commercetools.Sdk + - run: dotnet test --verbosity=normal Tests/commercetools.Sdk.HistoryApi.Tests --no-build -c Release + working-directory: ./commercetools.Sdk artifacts: name: Release runs-on: ubuntu-latest -# needs: [unittests, integrationtests] + needs: [unittests] steps: - uses: actions/checkout@v2 # Authenticates packages to push to GPR @@ -46,13 +74,3 @@ jobs: path: pack - name: Push generated package to NuGet run: dotnet nuget push "pack/*.nupkg" --api-key ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols true - - name: Create GH Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - draft: false - prerelease: false