Skip to content

Commit

Permalink
Merge pull request #263 from pulumi/aaronfriel/windows-tests
Browse files Browse the repository at this point in the history
Fix CI out of memory conditions on Windows
  • Loading branch information
AaronFriel committed Apr 20, 2022
2 parents 276ba67 + 4994974 commit 08b6936
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 251 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- run: go env
- name: Install Latest Pulumi CLI
if: env.PULUMI_VERSION == ''
uses: pulumi/action-install-pulumi-cli@v1.0.1
Expand Down Expand Up @@ -99,7 +100,7 @@ jobs:
cd tests && go test -v -json -count=1 -cover -timeout 6h -parallel ${{ env.TESTPARALLELISM }} . 2>&1 | tee /tmp/gotest.log | gotestfmt
env:
PULUMI_PYTHON_CMD: python
TESTPARALLELISM: 5
TESTPARALLELISM: 3
- if: contains(matrix.platform, 'macOS') || contains(matrix.platform, 'ubuntu')
name: Running non-Windows tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
cd tests && go test -v -json -count=1 -cover -timeout 6h -parallel ${{ env.TESTPARALLELISM }} . 2>&1 | tee /tmp/gotest.log | gotestfmt
env:
PULUMI_PYTHON_CMD: python
TESTPARALLELISM: 5
TESTPARALLELISM: 3
- if: contains(matrix.platform, 'macOS') || contains(matrix.platform, 'ubuntu')
name: Running non-Windows tests
run: |
Expand Down
47 changes: 29 additions & 18 deletions .github/workflows/run-templates-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,29 @@ env:
jobs:
test:
if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [ 1.16.x ]
node-version: [ 14.x ]
python-version: [ 3.7 ]
dotnet: [ 3.1.x ]
platform: [ubuntu-latest, windows-latest]
go-version: [1.16.x]
node-version: [14.x]
python-version: [3.7]
dotnet: [3.1.x]
runs-on: ${{ matrix.platform }}
steps:
- name: Install DotNet ${{ matrix.dotnet }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
- if: contains(matrix.platform, 'windows')
name: DotNet clean on windows
- if: contains(matrix.platform, 'ubuntu') || contains(matrix.platform, 'windows')
name: DotNet clean on windows and ubuntu
run: |
dotnet nuget locals all --clear
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set up Go${{ matrix.go-version }}
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
Expand All @@ -61,6 +62,14 @@ jobs:
run: |
pip3 install pyenv-win
pip3 install pipenv
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand All @@ -70,23 +79,25 @@ jobs:
role-duration-seconds: 3600
role-session-name: templates@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Set the Template URL using local repo path
run: echo "PULUMI_TEMPLATE_LOCATION=${{ github.workspace}}" >> $GITHUB_ENV
- name: Install gotestfmt
uses: jaxxstorm/action-install-gh-release@v1.3.1
with:
repo: haveyoudebuggedit/gotestfmt
- name: Get dependencies non-windows
- name: Get dependencies
run: make ensure
- name: Run tests
- if: contains(matrix.platform, 'windows')
name: Running Windows tests
shell: bash
run: |
set -euo pipefail
cd tests && go test -v -json -count=1 -cover -timeout 6h -parallel ${{ env.TESTPARALLELISM }} . 2>&1 | tee /tmp/gotest.log | gotestfmt
env:
PULUMI_PYTHON_CMD: python
TESTPARALLELISM: 3
- if: contains(matrix.platform, 'macOS') || contains(matrix.platform, 'ubuntu')
name: Running non-Windows tests
run: |
set -euo pipefail
cd tests && go test -v -json -count=1 -cover -timeout 6h -parallel ${{ env.TESTPARALLELISM }} . 2>&1 | tee /tmp/gotest.log | gotestfmt
Expand Down
6 changes: 3 additions & 3 deletions tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.15

require (
github.com/pulumi/pulumi-trace-tool v0.0.0-20210629202931-10ae87ca9439
github.com/pulumi/pulumi/pkg/v3 v3.5.1
github.com/pulumi/pulumi/sdk/v3 v3.5.1
github.com/stretchr/testify v1.7.0
github.com/pulumi/pulumi/pkg/v3 v3.29.1
github.com/pulumi/pulumi/sdk/v3 v3.29.1
github.com/stretchr/testify v1.7.1
)

0 comments on commit 08b6936

Please sign in to comment.