-
-
Notifications
You must be signed in to change notification settings - Fork 13
130 lines (130 loc) · 3.77 KB
/
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Tests
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
env:
TOOLS_DIRECTORY: tools
steps:
- name: Get the sources
uses: actions/checkout@v1
- name: Install Node 16
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install the .NET 6 SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
- name: Run a specific Cake script
uses: ./
with:
script-path: build.cake
- name: Run a specific target
uses: ./
with:
target: Successful-Task
- name: Remove the tools directory
run: rm -rf $TOOLS_DIRECTORY
shell: bash
- name: Run with a specific Cake version
env:
EXPECTED_CAKE_VERSION: 2.1.0
uses: ./
with:
cake-version: 2.1.0
target: Test-Cake-Version
- name: Run with a different Cake version in the same build
env:
EXPECTED_CAKE_VERSION: 2.0.0
uses: ./
with:
cake-version: 2.0.0
target: Test-Cake-Version
- name: Run with tool manifest
env:
EXPECTED_CAKE_VERSION: 1.2.0
uses: ./
with:
cake-version: tool-manifest
target: Test-Cake-Version
- name: Run automatic bootstrapping of Cake modules (Cake >= 1.0.0)
uses: ./
with:
cake-bootstrap: auto
cake-version: 1.0.0
script-path: module.cake
- name: Remove the tools directory
run: rm -rf $TOOLS_DIRECTORY
shell: bash
- name: Run automatic bootstrapping of Cake modules (Cake < 1.0.0)
uses: ./
with:
cake-bootstrap: auto
cake-version: 0.38.5
script-path: build.cake
target: Successful-Task
- name: Remove the tools directory
run: rm -rf $TOOLS_DIRECTORY
shell: bash
- name: Run explicit bootstrapping of Cake modules (Cake >= 1.0.0)
uses: ./
with:
cake-bootstrap: explicit
cake-version: 1.0.0
script-path: module.cake
- name: Remove the tools directory
run: rm -rf $TOOLS_DIRECTORY
shell: bash
- name: Run explicit bootstrapping of Cake modules (Cake < 1.0.0)
uses: ./
with:
cake-bootstrap: explicit
cake-version: 0.38.5
script-path: module.cake
- name: Remove the tools directory
run: rm -rf $TOOLS_DIRECTORY
shell: bash
- name: Run skip bootstrapping of Cake modules (Cake >= 1.0.0)
uses: ./
with:
cake-bootstrap: skip
cake-version: 1.0.0
script-path: build.cake
target: Successful-Task
- name: Run skip bootstrapping of Cake modules (Cake < 1.0.0)
uses: ./
with:
cake-bootstrap: skip
cake-version: 0.38.5
script-path: build.cake
target: Successful-Task
- name: Run with a specific verbosity level
uses: ./
env:
EXPECTED_VERBOSITY: Diagnostic
with:
verbosity: Diagnostic
target: Test-Verbosity
- name: Do a dry run
uses: ./
with:
dry-run: true
target: Test-Dry-Run
- name: Run with custom script parameters
uses: ./
env:
EXPECTED_STRING_ARGUMENT: '''value'''
EXPECTED_NUMERIC_ARGUMENT: '3'
EXPECTED_BOOLEAN_ARGUMENT: 'true'
with:
script-path: build.cake
target: Test-Script-Parameters
arguments: |
string-parameter: 'value'
numeric-parameter: 3
boolean-parameter: true