-
Notifications
You must be signed in to change notification settings - Fork 7
85 lines (76 loc) · 2.99 KB
/
e2e-test-setup.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
# Copyright The Notary Project Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: e2e-test-setup
on:
push:
pull_request:
jobs:
e2e-test-setup:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# E2E test cases on Notation Setup
- name: Setup Notation
uses: ./setup
- name: Setup Notation using unsupported version
id: unsupported-version
continue-on-error: true
uses: ./setup
with:
version: unsupported
- name: 'Should Fail: Setup Notation using unsupported version'
if: steps.unsupported-version.outcome != 'failure'
run: |
echo "Setup Notation using unsupported version should fail, but succeeded."
exit 1
- name: Setup Notation using URL
uses: ./setup
with:
url: https://github.com/notaryproject/notation/releases/download/v1.2.0/notation_1.2.0_linux_amd64.tar.gz
checksum: f781f0652adc633798fc1e1db12732d0b53e34d87d4bd2752c72b6bbed967bac
- name: Setup Notation using URL without checksum
id: no-checksum
continue-on-error: true
uses: ./setup
with:
url: https://github.com/notaryproject/notation/releases/download/v1.2.0/notation_1.2.0_linux_amd64.tar.gz
- name: 'Should Fail: Setup Notation using URL without checksum'
if: steps.no-checksum.outcome != 'failure'
run: |
echo "Setup Notation using URL without checksum should fail, but succeeded."
exit 1
- name: Setup Notation using URL and invalid checksum
id: invalid-checksum
continue-on-error: true
uses: ./setup
with:
url: https://github.com/notaryproject/notation/releases/download/v1.2.0/notation_1.2.0_linux_amd64.tar.gz
checksum: abcedf
- name: 'Should Fail: Setup Notation using URL and invalid checksum'
if: steps.invalid-checksum.outcome != 'failure'
run: |
echo "Setup Notation using URL and invalid checksum should fail, but succeeded."
exit 1
- name: Setup Notation using invalid URL
id: invalid-url
continue-on-error: true
uses: ./setup
with:
url: invalid-url
checksum: test
- name: 'Should Fail: Setup Notation using invalid URL'
if: steps.invalid-url.outcome != 'failure'
run: |
echo "Setup Notation using invalid URL should fail, but succeeded."
exit 1