forked from brokenpip3/setup-bats-libs
-
Notifications
You must be signed in to change notification settings - Fork 7
107 lines (105 loc) · 3.12 KB
/
test-public-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
name: CI
on:
workflow_dispatch:
pull_request:
release:
types: [published]
push:
branches: ["main"]
tags: ["*"]
jobs:
public_test:
strategy:
fail-fast: false
matrix:
version: ["1.7.0", "1.9.0", "1.11.0", "latest"]
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-latest, windows-2022, windows-latest, macos-14, macos-latest ]
runs-on: ${{ matrix.os }}
env:
BATS_LIB_PATH: "/usr/lib"
TERM: xterm
name: public
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats libs
id: setup-bats
uses: bats-core/bats-action@main
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
public_test_trigger_cache:
needs: [public_test]
strategy:
fail-fast: false
matrix:
version: ["1.7.0", "1.9.0", "1.11.0", "latest"]
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-latest, windows-2022, windows-latest, macos-14, macos-latest ]
runs-on: ${{ matrix.os }}
env:
TERM: xterm
name: public-no-cache
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats-libs
uses: bats-core/bats-action@main
id: setup-bats
with:
bats-version: ${{ matrix.version }}
support-clean: "false"
assert-clean: "false"
detik-clean: "false"
file-clean: "false"
- name: Execute example tests
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
shell: bash
run:
bats -T -p tests