-
Notifications
You must be signed in to change notification settings - Fork 5
72 lines (70 loc) · 2.42 KB
/
acceptance-tests.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
on:
workflow_call:
inputs:
folder:
type: string
required: true
description: The folder in which to run tests
env:
AWS_REGION: us-east-2
jobs:
acceptance-tests:
runs-on: ubuntu-latest
concurrency:
group: ${{ inputs.folder }}-test-${{ github.sha }}-${{ matrix.index }}
cancel-in-progress: false
steps:
- name: Checkout Repo
uses: actions/checkout@v4
# Needed for pulumictl to calculate version
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
repo: pulumi/pulumictl
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
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: pulumi-cdk@githubActions
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.x
registry-url: https://registry.npmjs.org
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
cache-dependency-path: ./*.sum
- name: Install Yarn
run: curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0
- name: Install packages
run: yarn install --frozen-lockfile
- name: Run build
run: yarn run set-version && yarn run build
- name: yarn link
run: yarn link
- name: set script-shell
run: yarn config set script-shell /bin/bash
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Generate go test Slice
id: test_split
uses: hashicorp-forge/[email protected]
with:
working-directory: ${{ inputs.folder }}
total: ${{ matrix.parallel }}
index: ${{ matrix.index }}
- name: Run ${{ inputs.folder }} tests
run: cd ${{ inputs.folder }} && gotestsum --format github-actions -- -v -count=1 -timeout 2h -parallel 4 -run "${{ steps.test_split.outputs.run }}"
strategy:
fail-fast: false
matrix:
parallel: [3]
index: [0, 1, 2]