-
Notifications
You must be signed in to change notification settings - Fork 3
91 lines (82 loc) · 3.38 KB
/
functional-test.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
name: "functional-test"
on:
push:
branches:
- '*'
pull_request:
workflow_dispatch:
jobs:
functionalSelfTest:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.INTEGRATION_TEST_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Get 1.1.1 release by tag
id: getByTag
uses: ./
with:
tag: 1.1.1
- name: Check getByTag step result
if: |
steps.getByTag.outputs.url != 'https://api.github.com/repos/cardinalby/git-get-release-action/releases/41301084' ||
steps.getByTag.outputs.assets_url != 'https://api.github.com/repos/cardinalby/git-get-release-action/releases/41301084/assets' ||
steps.getByTag.outputs.upload_url != 'https://uploads.github.com/repos/cardinalby/git-get-release-action/releases/41301084/assets{?name,label}' ||
steps.getByTag.outputs.html_url != 'https://github.com/cardinalby/git-get-release-action/releases/tag/1.1.1' ||
steps.getByTag.outputs.id != '41301084' ||
steps.getByTag.outputs.node_id != 'MDc6UmVsZWFzZTQxMzAxMDg0' ||
steps.getByTag.outputs.tag_name != '1.1.1' ||
steps.getByTag.outputs.target_commitish != 'master' ||
steps.getByTag.outputs.name != 'searchLimit input' ||
steps.getByTag.outputs.draft != 'false' ||
steps.getByTag.outputs.prerelease != 'false' ||
steps.getByTag.outputs.created_at != '2021-04-12T19:34:47Z' ||
steps.getByTag.outputs.published_at != '2021-04-12T19:37:29Z' ||
steps.getByTag.outputs.assets != '[]' ||
fromJson(steps.getByTag.outputs.author).id != 2001539 ||
steps.getByTag.outputs.tarball_url != 'https://api.github.com/repos/cardinalby/git-get-release-action/tarball/1.1.1' ||
steps.getByTag.outputs.zipball_url != 'https://api.github.com/repos/cardinalby/git-get-release-action/zipball/1.1.1' ||
steps.getByTag.outputs.body != 'searchLimit input added'
shell: bash
run: exit 1
- name: Get 1.1.1 release by releaseId
id: getByReleaseId
uses: ./
with:
releaseId: 41301084
- name: Check getByReleaseId step result
if: steps.getByReleaseId.outputs.tag_name != '1.1.1'
shell: bash
run: exit 1
- name: Check doNotFailIfNotFound
uses: ./
with:
releaseId: 123456677
doNotFailIfNotFound: 'true'
- name: Get testTag release by commitSha
id: getByCommitSha
uses: ./
with:
commitSha: e92acb19de8845ad1f3cb6cfab421ac26002d6b6
draft: false
prerelease: true
- name: Check getByCommitSha step result
if: |
steps.getByCommitSha.outputs.tag_name != 'testTag' ||
toJSON(steps.getByCommitSha.outputs.body) != '"test\r\nbody"'
shell: bash
run: |
echo "${{ steps.getByCommitSha.outputs.tag_name }}" &&
echo "${{ toJSON(steps.getByCommitSha.outputs.body) }}" &&
exit 1
- name: Get 1.1.1 release by commitSha
id: getFinalReleaseByCommitSha
uses: ./
with:
commitSha: e92acb19de8845ad1f3cb6cfab421ac26002d6b6
draft: false
prerelease: false
- name: Check getFinalReleaseByCommitSha step result
if: steps.getFinalReleaseByCommitSha.outputs.tag_name != '1.1.1'
shell: bash
run: exit 1