mirror of https://github.com/pulumi/pulumi.git
94 lines
2.9 KiB
YAML
94 lines
2.9 KiB
YAML
on:
|
|
pull_request:
|
|
|
|
env:
|
|
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_PROD_ACCESS_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PULUMI_TEST_OWNER: "moolumi"
|
|
GO111MODULE: "on"
|
|
|
|
jobs:
|
|
lint:
|
|
container: golangci/golangci-lint:latest
|
|
name: Lint ${{ matrix.directory }}
|
|
strategy:
|
|
matrix:
|
|
directory: [ sdk, pkg, tests ]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v2
|
|
- name: Lint ${{ matrix.directory }}
|
|
run: |
|
|
cd ${{ matrix.directory }} && golangci-lint run -c ../.golangci.yml
|
|
build_and_test:
|
|
name: Build & Test
|
|
strategy:
|
|
matrix:
|
|
platform: [ ubuntu-latest, macos-latest ]
|
|
go-version: [1.15.x]
|
|
python-version: [ 3.9.x ]
|
|
dotnet-version: [ 3.1.x ]
|
|
node-version: [ 14.x ]
|
|
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 "::add-path::${{ runner.temp }}/opt/pulumi/bin"
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v2
|
|
- name: Fetch Tags
|
|
run: |
|
|
git fetch --quiet --prune --unshallow --tags
|
|
- name: Set Go Dep path
|
|
run: |
|
|
echo "::set-env name=PULUMI_GO_DEP_ROOT::$(dirname $(pwd))"
|
|
- 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
|
|
|
|
|