Skip to content

Commit 2104b40

Browse files
authored
update public action as well (#20)
1 parent 141cb15 commit 2104b40

File tree

2 files changed

+48
-32
lines changed

2 files changed

+48
-32
lines changed
+47-31
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Test public from main"
1+
name: CI
22
on:
33
workflow_dispatch:
44
pull_request:
@@ -13,16 +13,18 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
version: ["1.7.0", "1.8.2", "1.9.0", "1.10.0", "1.11.0", "latest"]
17-
runs-on: ubuntu-latest
16+
version: ["1.7.0", "1.9.0", "1.11.0", "latest"]
17+
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-latest, windows-2022, windows-latest, macos-14, macos-latest ]
18+
runs-on: ${{ matrix.os }}
1819
env:
1920
BATS_LIB_PATH: "/usr/lib"
2021
TERM: xterm
21-
name: Install Bats common libs
22+
name: public
2223
steps:
2324
- name: Checkout
2425
uses: actions/checkout@v4
25-
- name: Setup Bats and Bats-libs
26+
- name: Setup Bats and Bats libs
27+
id: setup-bats
2628
uses: bats-core/bats-action@main
2729
with:
2830
bats-version: ${{ matrix.version }}
@@ -31,61 +33,75 @@ jobs:
3133
detik-clean: "false"
3234
file-clean: "false"
3335
- name: Execute test to check Bats-support
36+
shell: bash
37+
env:
38+
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
39+
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
3440
run: |
35-
cd /tmp/bats-support/
41+
cd ${TMP_PATH}/bats-support/
42+
echo $BATS_LIB_PATH
3643
bats test
3744
- name: Execute test to check Bats-assert
45+
shell: bash
46+
env:
47+
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
48+
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
3849
run: |
39-
cd /tmp/bats-assert/
50+
cd ${TMP_PATH}/bats-assert/
4051
bats test
4152
- name: Execute test to check Bats-detik
53+
shell: bash
54+
continue-on-error: true
55+
env:
56+
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
57+
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
4258
run: |
43-
cd /tmp/bats-detik/
59+
cd ${TMP_PATH}/bats-detik/
4460
bats tests
4561
- name: Execute test to check Bats-file
62+
shell: bash
63+
# Currently the bats-file tests are broken
64+
# in gh runner env
4665
continue-on-error: true
66+
env:
67+
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
68+
TMP_PATH: ${{ steps.setup-bats.outputs.tmp-path }}
4769
run: |
48-
cd /tmp/bats-file/
70+
cd ${TMP_PATH}/bats-file/
4971
bats test
5072
- name: Execute example tests
73+
env:
74+
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
75+
shell: bash
5176
run:
5277
bats -T -p tests
78+
5379
public_test_trigger_cache:
54-
# Run the test again to eventually trigger the cache in the future
5580
needs: [public_test]
5681
strategy:
5782
fail-fast: false
5883
matrix:
59-
version: ["1.7.0", "1.8.2", "1.9.0", "1.10.0", "1.11.0", "latest"]
60-
runs-on: ubuntu-latest
84+
version: ["1.7.0", "1.9.0", "1.11.0", "latest"]
85+
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-latest, windows-2022, windows-latest, macos-14, macos-latest ]
86+
runs-on: ${{ matrix.os }}
6187
env:
62-
BATS_LIB_PATH: "/usr/lib"
63-
name: Install Bats common libs
88+
TERM: xterm
89+
name: public-no-cache
6490
steps:
6591
- name: Checkout
6692
uses: actions/checkout@v4
6793
- name: Setup Bats and Bats-libs
6894
uses: bats-core/bats-action@main
95+
id: setup-bats
6996
with:
7097
bats-version: ${{ matrix.version }}
7198
support-clean: "false"
7299
assert-clean: "false"
73100
detik-clean: "false"
74101
file-clean: "false"
75-
- name: Execute test to check Bats-support
76-
run: |
77-
cd /tmp/bats-support/
78-
bats test
79-
- name: Execute test to check Bats-assert
80-
run: |
81-
cd /tmp/bats-assert/
82-
bats test
83-
- name: Execute test to check Bats-detik
84-
run: |
85-
cd /tmp/bats-detik/
86-
bats tests
87-
- name: Execute test to check Bats-file
88-
continue-on-error: true
89-
run: |
90-
cd /tmp/bats-file/
91-
bats test
102+
- name: Execute example tests
103+
env:
104+
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
105+
shell: bash
106+
run:
107+
bats -T -p tests

.github/workflows/update-pre-commit-hooks.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: update-pre-commit-hooks
1+
name: CI
22

33
on:
44
workflow_dispatch:

0 commit comments

Comments
 (0)