-
Notifications
You must be signed in to change notification settings - Fork 7
114 lines (114 loc) · 3.61 KB
/
master.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
env:
AWS_REGION: us-west-2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: "on"
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PROVIDER: policy-aws
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
PULUMI_API: https://api.pulumi-staging.io
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
VERSION: ${{ github.event.client_payload.ref }}
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: ${{matrix.node-version}}
registry-url: https://registry.npmjs.org
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.2.0
with:
repo: pulumi/pulumictl
- name: Checkout Repo
uses: actions/checkout@v2
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Yarn
run: curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0
- name: Update PATH for Yarn
run: |
echo "$HOME/.yarn/bin" >> $GITHUB_PATH
echo "$HOME/.config/yarn/global/node_modules/.bin" >> $GITHUB_PATH
- name: Ensure
run: |
make ensure
- name: Lint Node
run: |
cd src && make lint
build_test_publish:
name: Build, Test, and Publish
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.1.0
with:
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/action-install-pulumi-cli@v1.0.1
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{matrix.node-version}}
registry-url: https://registry.npmjs.org
- name: Ensure dependencies
run: make ensure
- name: Checkout Scripts Repo
uses: actions/checkout@v2
with:
path: ci-scripts
repository: pulumi/scripts
- run: echo "ci-scripts" >> .git/info/exclude # actions/checkout#197
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-region: ${{ env.AWS_REGION }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-duration-seconds: 3600
role-session-name: ${{ env.PROVIDER }}@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Build SDK
run: make only_build
- name: Check worktree clean
run: ./ci-scripts/ci/check-worktree-is-clean
- name: Run Unit Tests
run: make only_test_fast
- name: Run Integration Tests
run: make test_all
- name: Publish
run: make publish
- name: Trigger Docs Build
run: |
./ci-scripts/ci/build-package-docs.sh "policy-aws"
env:
TRAVIS: true
PULUMI_BOT_GITHUB_API_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
TRAVIS_TAG: ${{ env.VERSION }}
strategy:
fail-fast: true
matrix:
platform: [ ubuntu-latest ]
go-version: [ 1.17.x ]
node-version: [ 20 ]
name: master
"on":
push:
branches:
- master
paths-ignore:
- CHANGELOG.md
tags-ignore:
- v*
- '**'