forked from boostercloud/booster
-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (61 loc) · 2.46 KB
/
re_test-integration-prepare.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
name: Prepare Integration Tests
on:
workflow_call:
inputs:
command_sha:
required: false
default: ${{ github.sha }}
type: string
pr_sha:
required: false
type: string
pr_number:
required: false
default: '0'
type: string
jobs:
prepare-integration-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.18
# If this was triggered by a /integration command, check out merge commit
- name: Fork based /integration checkout
id: fork-based-checkout
if: inputs.pr_number != '0' && inputs.command_sha != '' && contains(inputs.pr_sha, inputs.command_sha)
uses: actions/checkout@v4
with:
ref: 'refs/pull/${{ inputs.pr_number }}/merge'
- name: Build
uses: ./.github/actions/build
- name: Pack local dependencies for integration tests
uses: ./.github/actions/call-rush
with:
command: pack-integration-deps
# This step will upload all the files in the `packages/framework-integration-tests/.booster` folder
# to the GitHub Actions artifacts. This is needed because the integration tests are run in a different
# job, and we need to pass the dependencies to it. The artifact is suffixed with the name of the git
# commit, so that we can have multiple artifacts for the same branch. Those will be deleted after
# 1 day. It is also useful because these dependencies could be downloaded by the user to run the
# integration tests locally, or even test their own Booster applications with this version.
- name: Upload integration test dependencies
uses: actions/upload-artifact@v4
if: inputs.command_sha != ''
with:
# suffix the name with the git commit
name: integration-test-dependencies-${{ inputs.command_sha }}
path: packages/framework-integration-tests/.booster
retention-days: 1
include-hidden-files: true
- name: Upload integration test dependencies
uses: actions/upload-artifact@v4
if: inputs.command_sha == ''
with:
# suffix the name with the git commit
name: integration-test-dependencies-${{ github.sha }}
path: packages/framework-integration-tests/.booster
retention-days: 1
include-hidden-files: true