forked from brokenpip3/setup-bats-libs
-
Notifications
You must be signed in to change notification settings - Fork 7
91 lines (90 loc) · 2.43 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
name: "Test public from main"
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.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: Install Bats common libs
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats-libs
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
run: |
cd /tmp/bats-support/
bats test
- name: Execute test to check Bats-assert
run: |
cd /tmp/bats-assert/
bats test
- name: Execute test to check Bats-detik
run: |
cd /tmp/bats-detik/
bats tests
- name: Execute test to check Bats-file
continue-on-error: true
run: |
cd /tmp/bats-file/
bats test
- name: Execute example tests
run:
bats -T -p tests
public_test_trigger_cache:
# Run the test again to eventually trigger the cache in the future
needs: [public_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"
name: Install Bats common libs
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bats and Bats-libs
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
run: |
cd /tmp/bats-support/
bats test
- name: Execute test to check Bats-assert
run: |
cd /tmp/bats-assert/
bats test
- name: Execute test to check Bats-detik
run: |
cd /tmp/bats-detik/
bats tests
- name: Execute test to check Bats-file
continue-on-error: true
run: |
cd /tmp/bats-file/
bats test