mirror of https://github.com/pulumi/pulumi.git
181 lines
5.7 KiB
YAML
181 lines
5.7 KiB
YAML
#on:
|
|
# workflow_dispatch: {}
|
|
# schedule:
|
|
# - cron: '0 5 * * *'
|
|
on:
|
|
pull_request:
|
|
|
|
env:
|
|
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_PROD_ACCESS_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PULUMI_TEST_OWNER: "moolumi"
|
|
GO111MODULE: "on"
|
|
|
|
jobs:
|
|
build-and-test:
|
|
name: Build & Test
|
|
strategy:
|
|
matrix:
|
|
# platform: [ ubuntu-latest, macos-latest ]
|
|
platform: [ ubuntu-latest]
|
|
go-version:
|
|
- 1.15.x
|
|
python-version:
|
|
- 3.6.x
|
|
- 3.7.x
|
|
- 3.8.x
|
|
- 3.9.x
|
|
dotnet-version:
|
|
- 3.1.x
|
|
node-version:
|
|
- 10.x
|
|
- 12.x
|
|
- 14.x
|
|
- 15.x
|
|
fail-fast: false
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- 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: Set up DotNet ${{ matrix.dotnet-version }}
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: ${{ matrix.dotnet-version }}
|
|
- name: Set up Node ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- name: Install pipenv
|
|
uses: dschep/install-pipenv-action@v1
|
|
- name: Setup git
|
|
run: |
|
|
git config --global user.email "you@example.com"
|
|
git config --global user.name "Your Name"
|
|
- name: Update path
|
|
run: |
|
|
echo "${{ runner.temp }}/opt/pulumi/bin" >> $GITHUB_PATH
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v2
|
|
- name: Fetch Tags
|
|
run: |
|
|
git fetch --quiet --prune --unshallow --tags
|
|
- name: Set Go Dep path
|
|
run: |
|
|
echo "PULUMI_GO_DEP_ROOT=$(dirname $(pwd))" >> $GITHUB_ENV
|
|
- name: Ensure
|
|
run: |
|
|
make ensure
|
|
- name: Dist
|
|
run: |
|
|
make dist
|
|
env:
|
|
PULUMI_NODE_MODULES: ${{ runner.temp }}/opt/pulumi/node_modules
|
|
PULUMI_LOCAL_NUGET: ${{ runner.temp }}/opt/pulumi/nuget
|
|
PULUMI_ROOT: ${{ runner.temp }}/opt/pulumi
|
|
- name: Install
|
|
run: |
|
|
make install_all
|
|
env:
|
|
PULUMI_NODE_MODULES: ${{ runner.temp }}/opt/pulumi/node_modules
|
|
PULUMI_LOCAL_NUGET: ${{ runner.temp }}/opt/pulumi/nuget
|
|
PULUMI_ROOT: ${{ runner.temp }}/opt/pulumi
|
|
- name: Test
|
|
run: |
|
|
make test_all
|
|
env:
|
|
PULUMI_NODE_MODULES: ${{ runner.temp }}/opt/pulumi/node_modules
|
|
PULUMI_LOCAL_NUGET: ${{ runner.temp }}/opt/pulumi/nuget
|
|
PULUMI_ROOT: ${{ runner.temp }}/opt/pulumi
|
|
# windows-build:
|
|
# name: Windows Build + Test + Publish
|
|
# strategy:
|
|
# matrix:
|
|
# go-version: [1.15.x]
|
|
# node-version: [14.x]
|
|
# python-version: [3.9.x]
|
|
# dotnet: [3.1.x]
|
|
# runs-on: windows-latest
|
|
# env:
|
|
# GOPATH: ${{ github.workspace }}
|
|
# PULUMI_LOCAL_NUGET: "D:\\Pulumi\\nuget"
|
|
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_LEGACY }}
|
|
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_LEGACY }}
|
|
# ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
|
# 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@v2
|
|
# with:
|
|
# python-version: ${{ matrix.python-version }}
|
|
# - name: Clean
|
|
# run: dotnet nuget locals all --clear
|
|
# - name: Install Python Deps
|
|
# run: |
|
|
# pip3 install pyenv-win
|
|
# pip3 install pipenv
|
|
# - name: Set Build Env Vars
|
|
# shell: bash
|
|
# run: |
|
|
# echo "D:\\Pulumi\\bin" >> $GITHUB_PATH
|
|
# - name: Install AWS CLI Tools
|
|
# uses: chrislennon/action-aws-cli@v1.1
|
|
# - name: Check out scripts repo into the Go module directory
|
|
# uses: actions/checkout@v2
|
|
# with:
|
|
# repository: pulumi/scripts
|
|
# path: ./src/github.com/pulumi/scripts
|
|
# - name: Check out code into the Go module directory
|
|
# uses: actions/checkout@v2
|
|
# with:
|
|
# path: ./src/github.com/${{ github.repository }}
|
|
# - name: Fetch Tags
|
|
# run: |
|
|
# cd ./src/github.com/${{ github.repository }} && git fetch --quiet --prune --unshallow --tags
|
|
# - name: Get dependencies
|
|
# run: |
|
|
# cd src\github.com\${{ github.repository }}
|
|
# pushd .
|
|
# cd sdk
|
|
# go mod tidy
|
|
# go mod download
|
|
# popd
|
|
# pushd .
|
|
# cd pkg
|
|
# go mod tidy
|
|
# go mod download
|
|
# popd
|
|
# pushd .
|
|
# cd tests
|
|
# go mod tidy
|
|
# go mod download
|
|
# popd
|
|
# - name: Build Pulumi
|
|
# run: |
|
|
# cd src\github.com\${{ github.repository }}
|
|
# dotnet msbuild /t:Build /v:Detailed build.proj /p:PulumiRoot="D:\\Pulumi"
|
|
# - name: Run Pulumi Tests
|
|
# run: |
|
|
# cd src\github.com\${{ github.repository }}
|
|
# dotnet msbuild /t:Tests /v:Detailed build.proj /p:PulumiRoot="D:\\Pulumi"
|
|
# - name: Publish Binary
|
|
# run: |
|
|
# cd src\github.com\${{ github.repository }}
|
|
# dotnet msbuild /t:Publish /v:Detailed build.proj /p:PulumiRoot="D:\\Pulumi"
|