mirror of https://github.com/pulumi/pulumi.git
201 lines
6.8 KiB
YAML
201 lines
6.8 KiB
YAML
on:
|
|
pull_request:
|
|
|
|
env:
|
|
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_PROD_ACCESS_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PULUMI_TEST_OWNER: "moolumi"
|
|
GORELEASER_CURRENT_TAG: "2.8.2" # FIXME: use pulumictl for this
|
|
GO111MODULE: "on"
|
|
|
|
jobs:
|
|
test_pkg:
|
|
name: "Pulumi Tests: Pkg"
|
|
strategy:
|
|
matrix:
|
|
platform: [ ubuntu-latest ]
|
|
go-version: [1.14.x]
|
|
needs: build_sdk
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- name: Set up Go ${{ matrix.go-version }}
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: Install pulumictl
|
|
uses: jaxxstorm/action-install-gh-release@release/v1-alpha
|
|
with:
|
|
repo: pulumi/pulumictl
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Ensure dependencies
|
|
run: make ensure SUB_PROJECTS=""
|
|
- name: Setup git
|
|
run: |
|
|
git config --global user.email "you@example.com"
|
|
git config --global user.name "Your Name"
|
|
- name: Run tests
|
|
run: make test_fast SUB_PROJECTS=""
|
|
test_integration:
|
|
name: "Pulumi Tests: Integration"
|
|
strategy:
|
|
matrix:
|
|
platform: [ ubuntu-latest ]
|
|
node-version: [10.x]
|
|
python-version: [3.7]
|
|
dotnet: ['3.1.301']
|
|
go-version: [1.14.x]
|
|
language: [ "nodejs", "go", "dotnet", "python" ]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Fetch Git Tags
|
|
run: git fetch --quiet --prune --unshallow --tags
|
|
- name: Install DotNet ${{ matrix.dotnet }}
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: ${{ matrix.dotnet }}
|
|
- name: Set up Go ${{ matrix.go-version }}
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install pipenv
|
|
uses: dschep/install-pipenv-action@v1
|
|
- name: Install pulumictl
|
|
uses: jaxxstorm/action-install-gh-release@release/v1-alpha
|
|
with:
|
|
repo: pulumi/pulumictl
|
|
- name: Setup git
|
|
run: |
|
|
git config --global user.email "you@example.com"
|
|
git config --global user.name "Your Name"
|
|
- name: Update path
|
|
run: |
|
|
echo "::add-path::/opt/pulumi/bin"
|
|
- name: Ensure dependencies
|
|
run: make ensure
|
|
- name: Build
|
|
run: make only_build
|
|
env:
|
|
PULUMI_NODE_MODULES: "/opt/pulumi/node_modules"
|
|
PULUMI_LOCAL_NUGET: "/opt/pulumi/nuget"
|
|
- name: Run tests
|
|
run: cd tests && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 1 github.com/pulumi/pulumi/tests/integration...
|
|
env:
|
|
PULUMI_NODE_MODULES: "/opt/pulumi/node_modules"
|
|
PULUMI_LOCAL_NUGET: "/opt/pulumi/nuget"
|
|
GO111MODULE: "on"
|
|
test_sdks:
|
|
name: "Language Tests: ${{ matrix.language }}"
|
|
strategy:
|
|
matrix:
|
|
platform: [ ubuntu-latest ]
|
|
go-version: [1.14.x]
|
|
node-version: [10.x]
|
|
python-version: [3.7]
|
|
dotnet: ['3.1.301']
|
|
language: [ "nodejs", "go", "dotnet", "python" ]
|
|
needs: build_sdk
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- name: Install DotNet ${{ matrix.dotnet }}
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: ${{ matrix.dotnet }}
|
|
- 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 }}
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install pipenv
|
|
uses: dschep/install-pipenv-action@v1
|
|
- name: Install pulumictl
|
|
uses: jaxxstorm/action-install-gh-release@release/v1-alpha
|
|
with:
|
|
repo: pulumi/pulumictl
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: setup git
|
|
run: |
|
|
git config --global user.email "you@example.com"
|
|
git config --global user.name "Your Name"
|
|
- uses: actions/download-artifact@v2
|
|
name: Download ${{ matrix.language }} Artifacts
|
|
id: download
|
|
with:
|
|
name: pulumi-${{ matrix.language}}
|
|
path: sdk/${{ matrix.language}}
|
|
- name: Update path
|
|
run: echo "::add-path::${{steps.download.outputs.download-path}}/bin"
|
|
- name: Restore binary permissions
|
|
run: find ${{steps.download.outputs.download-path}}/bin -name "pulumi-language-${{ matrix.language }}" -print -exec chmod +x {} \;
|
|
- name: Ensure dependencies
|
|
run: make -C sdk/${{ matrix.language }} ensure
|
|
- name: Run tests
|
|
run: make -C sdk/${{ matrix.language }} only_test
|
|
|
|
build_sdk:
|
|
name: "Build SDK: ${{ matrix.language }}"
|
|
strategy:
|
|
matrix:
|
|
platform: [ ubuntu-latest ]
|
|
go-version: [1.14.x]
|
|
node-version: [10.x]
|
|
python-version: [3.7]
|
|
dotnet: ['3.1.301']
|
|
language: [ "nodejs", "go", "dotnet", "python" ]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- name: Install DotNet ${{ matrix.dotnet }}
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: ${{ matrix.dotnet }}
|
|
- 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 }}
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install pipenv
|
|
uses: dschep/install-pipenv-action@v1
|
|
- name: Install pulumictl
|
|
uses: jaxxstorm/action-install-gh-release@release/v1-alpha
|
|
with:
|
|
repo: pulumi/pulumictl
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Fetch Git Tags
|
|
run: git fetch --quiet --prune --unshallow --tags
|
|
- name: Ensure dependencies
|
|
run: make -C sdk/${{ matrix.language }} ensure
|
|
- name: Build SDK
|
|
run: make -C sdk/${{ matrix.language }} ci_build
|
|
- uses: actions/upload-artifact@v2
|
|
name: Upload ${{ matrix.language }} Artifacts
|
|
with:
|
|
name: pulumi-${{ matrix.language}}
|
|
path: sdk/${{ matrix.language }}
|
|
|