generated from fabasoad/typescript-setup-action
-
-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (67 loc) · 1.71 KB
/
functional-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
---
name: Functional Tests
on: # yamllint disable-line rule:truthy
push:
branches:
- main
pull_request:
paths:
- .github/workflows/functional-tests.yml
- src/**
- action.yml
schedule:
# Every Friday at 09:00 JST
- cron: "0 0 * * 5"
workflow_dispatch: {}
defaults:
run:
shell: sh
jobs:
run-script:
name: Run script
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: ["ubuntu", "macos", "windows"]
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
- name: Setup Kitten
uses: ./
- name: Run script
run: kitten ./hello-world.ktn
test-force:
name: Test force
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
force: ["true", "false"]
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
- name: Setup kitten 1
id: setup-kitten-1
uses: ./
- name: Setup kitten 2
id: setup-kitten-2
uses: ./
with:
force: ${{ matrix.force }}
- name: Test action completion
run: |
test_equal() {
if [ "${2}" != "${3}" ]; then
echo "::error title=${1}::Expected: ${3}. Actual: ${2}."
exit 1
fi
}
test_equal "Wrong \"installed\" output from setup-kitten-1" \
"${{ steps.setup-kitten-1.outputs.installed }}" \
"true"
test_equal "Wrong \"installed\" output from setup-kitten-2" \
"${{ steps.setup-kitten-2.outputs.installed }}" \
"${{ matrix.force }}"