forked from brokenpip3/setup-bats-libs
-
Notifications
You must be signed in to change notification settings - Fork 7
142 lines (140 loc) · 4.26 KB
/
test-local-action.yaml
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
131
132
133
134
135
136
137
138
139
140
141
142
name: CI
on:
workflow_dispatch:
pull_request:
release:
types: [published]
push:
branches: ["main"]
tags: ["*"]
jobs:
local_test:
strategy:
fail-fast: false
matrix:
version: ["1.7.0", "1.8.2", "1.9.0", "1.10.0", "1.11.0", "latest"]
# Last 2 major version per each os
os: [ ubuntu-22.04, ubuntu-latest, windows-2022, windows-latest, macos-14, macos-latest ]
runs-on: ${{ matrix.os }}
env:
TERM: xterm
name: local
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats libs
id: setup-bats
uses: ./
with:
bats-version: ${{ matrix.version }}
support-clean: "false"
assert-clean: "false"
detik-clean: "false"
file-clean: "false"
- name: Execute test to check Bats-support
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd ${TMP_PATH}/bats-support/
echo $BATS_LIB_PATH
bats test
- name: Execute test to check Bats-assert
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd ${TMP_PATH}/bats-assert/
bats test
- name: Execute test to check Bats-detik
shell: bash
continue-on-error: true
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd ${TMP_PATH}/bats-detik/
bats tests
- name: Execute test to check Bats-file
shell: bash
# Currently the bats-file tests are broken
# in gh runner env
continue-on-error: true
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd ${TMP_PATH}/bats-file/
bats test
- name: Execute example tests
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
shell: bash
run:
bats -T -p tests
local_test_trigger_cache:
needs: [local_test]
strategy:
fail-fast: false
matrix:
version: ["1.7.0", "1.8.2", "1.9.0", "1.10.0", "1.11.0", "latest"]
runs-on: ubuntu-latest
env:
BATS_LIB_PATH: "/usr/lib"
TERM: xterm
name: local default cache
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats libs
uses: ./
with:
bats-version: ${{ matrix.version }}
support-clean: "false"
assert-clean: "false"
detik-clean: "false"
file-clean: "false"
- name: Execute test to check Bats-support
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.bats-lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd ${TMP_PATH}/bats-support/
bats test
- name: Execute test to check Bats-assert
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.bats-lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd ${TMP_PATH}/bats-assert/
bats test
- name: Execute test to check Bats-detik
shell: bash
continue-on-error: true
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.bats-lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd ${TMP_PATH}/bats-detik/
bats tests
- name: Execute test to check Bats-file
shell: bash
# Currently the bats-file tests are broken
# in gh runner env
continue-on-error: true
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.bats-lib-path }}
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
run: |
cd ${TMP_PATH}/bats-file/
bats test
- name: Execute example tests
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.bats-lib-path }}
shell: bash
run:
bats -T -p tests