-
Notifications
You must be signed in to change notification settings - Fork 825
60 lines (52 loc) · 1.84 KB
/
smoke-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
name: Smoke Tests
# This is required by aws-actions/configure-aws-credentials
permissions:
id-token: write
contents: read
on:
workflow_call:
inputs:
os:
required: false
type: string
default: '["macos-latest-xl", "ubuntu-latest", "amplify-cli_windows-latest_8-core"]'
versions:
required: false
type: string
default: '["rc", "latest"]'
env:
NODE_OPTIONS: --max-old-space-size=8096
IS_AMPLIFY_CLI_SMOKE_TEST_RUN: true
jobs:
run-smoke-tests:
strategy:
fail-fast: false
matrix:
os: ${{ fromJson(inputs.os) }}
cli-version: ${{ fromJson(inputs.versions) }}
name: Smoke Tests ${{ matrix.os }} ${{ matrix.cli-version }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
persist-credentials: false
- name: Install Python
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: '3.11'
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # version 4.0.2
if: runner.os == 'Windows'
with:
# Pin node to version before 18.20.2 due to https://github.com/nodejs/node/issues/52554
# Amplify App tries to spawn npm.cmd here https://github.com/aws-amplify/amplify-cli/blob/9571383521e6536ecf6568876609654393b27abb/packages/amplify-app/src/index.js#L88-L93
node-version: 18.20.0
- name: Install Amplify CLI
uses: ./.github/actions/install-cli
with:
cli-version: ${{ matrix.cli-version }}
- name: Run Smoke Tests
uses: ./.github/actions/run-smoke-tests
with:
role-to-assume: ${{ secrets.SMOKE_TESTS_ROLE_ARN }}
cli-version: ${{ matrix.cli-version }}